32,199 Topics

Member Avatar for
Member Avatar for smsamrc

below is a method describes polynomial multiplication. all the insertTail() and insertFirst() are in the normal format of linked lists. can anyone please show me why it doesnt give me the right multiplication. [CODE] public static void mulpolynomial(String poly1, String poly2) { String[] pp1 = poly1.split(" "); String[] pp2 = …

Member Avatar for BestJewSinceJC
0
708
Member Avatar for Q8iEnG

Hi mates :) how are you? I hope everything is all-right.. ;) I have a small question, it is my HW to be honest here is the question: "Write a method that calculates the following equation: f(x) = 1 if x = 0,1 √ f(x-1) + √ f(x-2) if x …

Member Avatar for Q8iEnG
0
108
Member Avatar for daffer

Hi all I am new to Java and having trouble with constructors with images and audio. I have tried to use the API library to work it out myself but cannot understand what they are talking about. My problem is that I am trying to create two instances of the …

Member Avatar for javaAddict
0
121
Member Avatar for king_786

i am stuk on this and have a[solutly no idea in how to create the while loop!!! could someone please show me how to do this??? Write a Java application that calculates the number of repayments for a loan based on the initial loan amount, annual interest rate and monthly …

Member Avatar for BestJewSinceJC
0
107
Member Avatar for Utter_iMADNESS

Hi. I'm working on a program that rolls 2 dice a number of times and displays the number of rolls per combination. It also displays this in a bar graph that shows the percentage of times that each combination got rolled. I've gotten to the point where it rolls the …

Member Avatar for BestJewSinceJC
0
173
Member Avatar for StevenJava

For one of my programing classes I have to design a maze game, that has a character moving in a maze against time. The question is how to make it so that this character, in this case a button, can not pass through the maze line. I have decided to …

Member Avatar for BestJewSinceJC
0
81
Member Avatar for king_786

Write a Java application that displays factorials for a user input specified number. The factorial of a number, n, is the product of all of the positive integer values between 1 and n, and denoted by the ! symbol. For example, the factorial of 5, 5!, is calculated by multiplying …

Member Avatar for mvmalderen
0
242
Member Avatar for BestJewSinceJC

I have a JTabbedPane inside a JFrame. I've been having a lot of problems with resizing and things like that. . how do I get the JTabbledPane to resize with the JFrame? So when the user drags the window open to a larger size, the JTabbedPane should be dragged to …

Member Avatar for BestJewSinceJC
0
169
Member Avatar for venugreddy

Hi All - I am using Hibernate Transactions in our project . The flow is as follows. JSP --> Actions -- > Business Layer --> Component Layer --> Persistence Layer --> Data base Currentl I am doing Transaction management in Persistence Layer. Can I do it in business layer ? …

Member Avatar for venugreddy
0
91
Member Avatar for cosi

I'm a RSS grubber that can't feed enough RSS into my RSS aggregator. If you don't know about RSS, RSS is a great way to get news/articles from multiple sources. Here is a link explaining RSS with many RSS programs you may use to view feeds: [url]http://reviews.cnet.com/4520-10088_7-5143656.html?tag=rss[/url] This comes especially …

Member Avatar for BestJewSinceJC
0
177
Member Avatar for testing321

how wud i create a code tht wud display letters of a string entered by user according to the number being odd or even? so say user enters sentence: i like ice cream. the even output : ilkiecem odd output: the rest of the letters (tht are at odd positions) …

Member Avatar for BestJewSinceJC
0
133
Member Avatar for abd640

Hi Guys, i really need your help. i have a nia ocz product(that use your brain signal and your muscle movement for performing some actions)... this product generate EEG signals(alpha and beta) and from it you can do some actions. it is used in gaming, and it is designed for …

Member Avatar for JamesCherrill
0
137
Member Avatar for spec80

Hi, I am trying to use recursion and count to find the number of times the number 5 appears in an array. I have the following code: [CODE]public static int countfive(double[] array1, int beginarray, int endarray,int count) { int next; if(beginarray==endarray) { if(array1[startIndex]==5) return 1; else return 0; } else …

Member Avatar for spec80
0
119
Member Avatar for rockin_rebel

Hi everyone I am having a lot of trouble trying to get the toUpperCase method working. I have basically put a String of text into a character array and I want to convert a certain character in a certain place in the String to uppercase. Here is what I have: …

Member Avatar for rockin_rebel
0
3K
Member Avatar for jacline

I wrote a code about circle starts to grow followed by finner circles, with each new one disappearing earlier while growing but in my code it is only growing how can I disappear the early one?? I didnt put the main method only classes [code] import java.util.ArrayList; import javax.swing.*; import …

Member Avatar for Ezzaral
0
166
Member Avatar for kid icarus

I had to implement a priority queue using binary heaps, which I think I have gotten completed, except for one method. We have implement a delete(Anytype X) method which deletes the object x from the priority queue. (It should return false if x is not in the priority queue, and …

0
71
Member Avatar for brizwhiz

My program compiles without any errors, however, when I go to run it all I get is a message saying "Welcome to the Payroll Program". From there it does not print anything else nor allows me to enter any information. If someone could please take a look at my program …

Member Avatar for BestJewSinceJC
0
1K
Member Avatar for abhi_elementx

Hi all. I am trying to connect to MySQL database on a remote m/c(IP: 192.168.120.44) Heres my code: [CODE] System.out.println("Making new connection(object).."); Class.forName("com.mysql.jdbc.Driver").newInstance(); con = DriverManager.getConnection("jdbc:mysql://192.168.120.44:3306/tox_erp10","root","tiger"); System.out.println("Done"); [/CODE] I am using netbeans IDE. [B]I can connect to the remote database thru SERVICES in netbeans[/B]. But the code doesnt work.. It …

0
76
Member Avatar for vict0rjr

/** * This method will ask the user for some information, create a blank picture to use as a palette and create and display the palette. */ 186 public static void main(String[] args) { 187 int redValue; 188 Scanner sc = new Scanner(System.in); 189 System.out.print("Enter a Red value: "); 190 …

Member Avatar for vict0rjr
0
134
Member Avatar for coolbuddy059

I've tried to make connection with oracle database using code: import java.io.*; import java.sql.*; public class dbcon{ public static void main(String[] args) { try{ String driver="oracle.jdbc.driver.OracleDriver"; Class.forName(driver); String jdbcURL="jdbc:oracle:thin:@127.0.0.1:1521:stud"; String username="scott"; String password="tiger"; Connection conn=DriverManager.getConnection(jdbcURL,username,password); System.out.println("***Connected to the database***"); conn.close(); }catch(ClassNotFoundException e){ System.out.println("could not find the database driver"); }catch(SQLException e){ …

Member Avatar for Ezzaral
0
94
Member Avatar for petike

Hi all, I am working on the "Pacman" game and I want to use the "double buffering" technique for animation. By now, I have used this code: [CODE=Java] class GamePanel extends JPanel { public void paint(Graphics g) { // Do some drawing here... } } [/CODE] and there was by …

Member Avatar for Ezzaral
0
271
Member Avatar for ganmo

Hi, I wonder if it's possible to check whether a MySQL DB has updated. e.g. new information is added to a table? and if it detect an update. it will perform search or something else. Main question is if it is possible to listen for changes in the db.

Member Avatar for masijade
0
106
Member Avatar for abhi_elementx

hi all. I want to ch ange my jframe's icon(cup of coffee). i chkd the forum but that's what i m doing... here's my code: [CODE]public static void main(String args[]) { java.awt.EventQueue.invokeLater(new Runnable() { public void run() { AppStarter dialog = new AppStarter(new javax.swing.JFrame(), true); dialog.setLocationRelativeTo(null); dialog.addWindowListener(new java.awt.event.WindowAdapter() { public …

Member Avatar for abhi_elementx
0
192
Member Avatar for christiangirl

Hello, this code is throwing and IOException and FileNotFoundException and I am having trouble figuring out why. Where exactly does the song need to go in order for the program to pick it up? Also, is this code for putting the song in the program correct? Thanks! [code] //Hangman a …

Member Avatar for christiangirl
0
136
Member Avatar for maximilian2006

I couldwrite a customize JButton in java What I mean by a customize JButton is that I overridden some of it's methods, such as paintBorder, paintComponent. I could write a round,triangle or any other shaped JButton. I wonder how to write a different shaped JFrame, such as round or triangle …

Member Avatar for JamesCherrill
0
119
Member Avatar for abhi_elementx

Hello guys. I am doing a swing application wherein I m using a DefaultTableModel. Here's my code: [CODE] DefaultTableModel tab = new DefaultTableModel(){ @Override public boolean isCellEditable(int r, int c){ //if(c == 10) {return true;} return false; } }; private JTable jt = new JTable(tab); [/CODE] The JTable will diplay …

Member Avatar for abhi_elementx
0
102
Member Avatar for Upsilon

Hi guys, Just a question I think many people like myself would like to know the answer to. I have been using the Graphics2D class and it works great, however now I want to do some 3D things. I would like to know how to place ellipsoids in 3D space, …

Member Avatar for BestJewSinceJC
0
227
Member Avatar for VernonDozier

I am trying to learn GridBagLayout. I've gotten the hang of it in many respects, but I am having serious problems when the first row has element(s) with a gridwidth greater than 1 or the first column has elements(s) with a gridheight greater than 1. I'm trying to make a …

Member Avatar for VernonDozier
0
402
Member Avatar for ckillackey

Hey guys, I think I have this mostly figured out but i'm still getting some errors, I'm not sure if it's a syntax thing or if I called out a variable wrong. For some reason eclipse is saying that my variable [B]average[/B] "may not have locally been declared" which doesn't …

Member Avatar for ckillackey
0
249
Member Avatar for ddaudi8

Hi there, I'm new to java. And I would like to get data that I have in a Ms Access database and sending to a excel spreadsheet using java. I've search the web and I keep finding the ohter way around. Could anyone provide me with a sample java code …

Member Avatar for JamesCherrill
0
122

The End.