2,777 Posted Topics

Member Avatar for Anonymous123
Member Avatar for Anonymous123
0
279
Member Avatar for mehnihma

Please post the full text of the error message. It shows which line the error occured on. Or if you know the line number, look at that line and find what variable has the null value and then backtrack in the code to see why that variable does not have …

Member Avatar for mehnihma
0
141
Member Avatar for dburris

Use the jdb reference to an instance of the Calculator class to call the calculate() method. The code is ignoring the value returned by the method???

Member Avatar for NormR1
0
172
Member Avatar for Dmiller071

For some examples look at the API doc for java.util.List (an interface) and then at a class that implements it: ArrayList

Member Avatar for Dmiller071
0
158
Member Avatar for prnjn

If the data you want is contained in varaibles in the dialog box class, you need to add methods to that class that you can call to get the data. Can you post the code you are having problems with.

Member Avatar for prnjn
0
211
Member Avatar for prnjn

> How to know which jList is selected Each JList can have a selected item in it. What do you mean by "JList is selected"? They all can have a selected item. Have you looked at the API doc for the JList class? It has lots of methods that could …

Member Avatar for prnjn
0
745
Member Avatar for nidheeshkumar.r

One thing that could help you see what the code is doing: Print out the contents of the array before the call to the method and after the call.

Member Avatar for NormR1
0
232
Member Avatar for mehnihma

> how can I stop generating numbers when I hit the target number Where do you get the numbers? When you get the target number, stop asking for any more numbers. Either exit the loop or return from the method when the target number is hit. Your code has too …

Member Avatar for mehnihma
0
165
Member Avatar for Transcendent

Are you talking about Strings in those formats? Like "111" as binary would have an int value of 7 I don't think there is a method to convert a String in one format to a String in another format. You will probably have to combine some methods to do that.

Member Avatar for JamesCherrill
0
122
Member Avatar for charlie.beat

To format the numbers like you want you can use the DecimalFormat class. It has lots of formatting characters to generate many different formats. For the date, see the SimpleDateFormat class. It also has many formatting options. Find the API docs for these classes at: [Link Anchor Text](http://docs.oracle.com/javase/6/docs/api/index.html)

Member Avatar for charlie.beat
0
221
Member Avatar for crash bash

Can you explain your problem? I see a definition for the MyDate class in your post.

Member Avatar for crash bash
0
208
Member Avatar for JavaLearners123

Can you explain what your problem is? What happens when you execute the program? If there are errors, please post the full text of the error messages.

Member Avatar for NormR1
0
236
Member Avatar for emitremmit

That is true. You can not convert a double to an array of doubles. You must change one or the other so that they are both the same type: double or double[] Please post the full text of the error message. Your editted version leaves off information.

Member Avatar for Subliminimalist
0
190
Member Avatar for prnjn

In the MainFrame class call a method in the LoginForm class that returns the contents of jTextField1 and use thst to set the text of jLabel1. Or have the button listener in the LoginFormm class get the value from the text field and call a method in the MainFrame class …

Member Avatar for mehfooz
0
243
Member Avatar for jot121

Can you explain what the problem is? Do you have the algorithm for the sort and are having trouble writing the code for the algorithm or do you need an algorithm?

Member Avatar for Patil Raj
0
125
Member Avatar for Tuz

The compiler has found some potential problems in your code and recommends that you use the -Xlint option of the javac command to see the full text of the warning/error messages. Add the -Xlint option to the compiler's options and recompile the program.

Member Avatar for Ludachrispeed
0
209
Member Avatar for Torf

You can put more than one class definition into a java source file. Only one can be public at the root level. Also you can define classes inside of other classes. There are utility classes: Arrays and Collections that have a sort method you can use if you properly define …

Member Avatar for NormR1
0
112
Member Avatar for rmash
Member Avatar for Enjaz
Member Avatar for Enjaz
0
162
Member Avatar for jayadan

The Graphics class has a setFont method. Call it with the required font size before drawing the String that you want at that font size. For the String: "83." and the String "50" and the String "7"

Member Avatar for NormR1
0
220
Member Avatar for london-G
Member Avatar for elijahStar
0
99
Member Avatar for maxinville
Member Avatar for maxinville
0
359
Member Avatar for sssabita

Sounds like AI stuff. Most of your problem will be design. When you get a design then we can help you with the java coding part. Good luck.

Member Avatar for siva111
0
176
Member Avatar for raviaaaa

>java.lang.ClassNotFoundException: com.scand.jtree.TreeApplet.class The error message says that the JVM can not find a class named: com.scand.jtree.TreeApplet**.class** This looks like a filename (has the .class extension) not a class name. Remove the .class to make it a class name.

Member Avatar for NormR1
0
216
Member Avatar for DreamTheater85

How did you try to debug it? I don't see many printlns statements to show the changes in the variables and the execution flow. You need to print out everything so you can see what the computer sees. If you understand how the code is supposed to work, when you …

Member Avatar for NormR1
0
183
Member Avatar for arathy nair

Can you post the code that you are having problems with. Pseudo code: begin loop get next record process record possibly causing an exception handle exception end loop

Member Avatar for NormR1
0
180
Member Avatar for frank33

I'd use a Thread to move processing off of the EDT's thread for one example. Another use would be when you want to be able to get data from a file or the internet and at the same time have a responsive GUI that the user can interact with. Another …

Member Avatar for frank33
0
134
Member Avatar for corvenzo

Take a look at these pages: [Link Anchor Text](http://docs.oracle.com/javase/tutorial/java/javaOO/classes.html

Member Avatar for ash.28.88
0
480
Member Avatar for Afropuff01

What compiler errors do you get when you try to compile the program? Try using the javac command to compile the program and see what error messages it gives.

Member Avatar for JamesCherrill
0
135
Member Avatar for macdunk11

>how do I find out exactly how long it took Get the starting time and save it in a long variable. When done, get the current time and subtract from it the starting time to get how long it took.

Member Avatar for macdunk11
0
163
Member Avatar for 3nrichedd

Can you post the output from the progam that shows what is does? Your recursive call can be a problem. What will be the values of the variable that is returned by the method when the recursive call returns? Add a println in the catch block to print out its …

Member Avatar for poojavb
0
241
Member Avatar for dancingdophie
Member Avatar for nyfan68

Have you tried writing a small simple program with a String for testing with the split() method? That would allow you to experiment to see how it works. The Arrays class's toString() method is useful for formatting arrays for printing: print this: Arrays.toString(<THEARRAYNAMEHERE>) Try split() with some sample Strings, print …

Member Avatar for |-|x
0
205
Member Avatar for bsabowala

If you can paste a String and the text from a file is a String, why can't you paste the String read from a .txt file to the clipboard?

Member Avatar for bsabowala
0
246
Member Avatar for Stjerne
Member Avatar for NormR1
0
208
Member Avatar for Dmiller071

> determine whether or not a path turns or ends up in a dead-end, By checking the adjacent pixels to see if the clear path continues or if it ends.

Member Avatar for Dmiller071
0
174
Member Avatar for MahdiAlQaffas

Take a piece of grid paper and draw out the first set of rectangles and look at the relationship between the x,y for the large rectangle and the smaller ones at each corner. Then draw the next set and do the same to find the formula for computing the x,y …

Member Avatar for NormR1
0
243
Member Avatar for tyu4

If the user is to enter the name of the month, you will have to read a String as input from the user. > create a string array and search the list for the position in the array. Your idea about the String array sounds ok. Where is the problem …

Member Avatar for NormR1
0
2K
Member Avatar for setiawan.fenrir

Quoted > I have a problem with this program Please explain what the problem is. If you get errors, please copy the message and post it here.

Member Avatar for NormR1
0
170
Member Avatar for blake81

Are you looking for a different formatting and contents for the program's output? Instead of this: momPalindrometrue you want this: Mom is a palindrome Where is the current output generated? Find where the current output comes from and change it to output what you want to see.

Member Avatar for NormR1
0
299
Member Avatar for jarograv

Have you read the API doc for the classes and methods that the code uses? Did you have questions about what the doc says?

Member Avatar for NormR1
0
297
Member Avatar for Masque

> what is wrong with this? Can you post the console from when the code is executed and add some coments to it that explains what the problem is?

Member Avatar for Masque
0
487
Member Avatar for andisss

> what could be causing this? The method is calling itself too many times. When do you expect that it will stop calling itself? Try debugging the code by adding some println statements to show the values of the variables used so you can see what the computer sees when …

Member Avatar for NormR1
0
168
Member Avatar for caba992
Member Avatar for NormR1
0
131
Member Avatar for Checkerboz

A double is a numeric value that doesn't a a "look" until you format it. How it "looks" depends on how you format it for viewing. The DecimalFormat class is one way to format a number for viewing. Are you comparing numeric values or Strings?

Member Avatar for NormR1
0
215
Member Avatar for DreaIVI

The updating of GUI is done on the same execution thread that was used to call your listener method. It will not do any updating until the listener method returns usage of the thread. All the changes you make on the thread are not made visible until the JVM gets …

Member Avatar for NormR1
0
204
Member Avatar for Dexxta27

> Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException at AKDatabase.CSubmitActionPerformed(AKDatabase.java:193) Look at line 193 and see what variables are used on that line. find the one with the null value. You could print out the values of all the variables used there to see which one is null. Then backtrack in the …

Member Avatar for Dexxta27
0
124
Member Avatar for Dmiller071

The BufferedImage class has a method that returns an array of pixels that can be scanned. I do not know of any class or method that will scan that array for what you wan to find.

Member Avatar for Dmiller071
0
277
Member Avatar for foxy123

Where is the button array used on line 34 given values for its elements? Think about the scope of variable definitions and if you have more than one variable defined with the same name. If you use unique names for all your variabes (except for loop variables like i and …

Member Avatar for foxy123
0
175
Member Avatar for java_sabin

To connect two programs through sockets, one needs to use a ServerSocket and the other a Socket. The ServerSocket's accept method will receive a connection from the other program's Socket object.

Member Avatar for bambam2174
0
258

The End.