2,777 Posted Topics

Member Avatar for sathish1990

Can you explain your logic in pseudo code that solves the problem? If you have a bad design then you should fix that. If you have good logic, is your code following your logic? Add some println statements to the code to show what it is doing. If you understand …

Member Avatar for JamesCherrill
0
168
Member Avatar for Saviour4You

The details section has a good list for starting: basic socket programming, threading and GUI design using Javasnetwork library, threading system, and swing user interface libraries and more here: keep track of these handlers some sort of dynamic data structure such as a vector or similar data structure

Member Avatar for NetJunkie
0
290
Member Avatar for choosenalpha

Your code is doing what you are asking it to do. If you want it to do something different, you need to change the code. What does the replace() method do? What do you expect it to do? Read the API doc for the replace() method to see how to …

Member Avatar for TrustyTony
0
222
Member Avatar for Baduizm

Do you get the line number where the error occurs so you can find the null variable and fix the problem?

Member Avatar for Baduizm
0
164
Member Avatar for coding101

Can you post some output that shows what the code is doing and add some comments to the output to show what it should be. Add enough debugging printlns to the code to show how the variables are set and changed as the code executes. What is the insert method …

Member Avatar for NormR1
0
102
Member Avatar for Hypnos_16
Member Avatar for mags11

> Textfield doesn't seem to be aligned with the Message Label. You should look into how to use layout managers. Your code appears to be using the default layout manager for the JPanel class. The are several choices of layout managers. Some times you need to creat a new panel …

Member Avatar for NormR1
0
740
Member Avatar for Stevo812

Put the Ball objects into an arraylist and change the code that refers to the 2 individual Ball objects to use a loop to get the objects one at a time from the arraylist.

Member Avatar for Stevo812
0
1K
Member Avatar for jackbauer24
Member Avatar for idlackage
Member Avatar for froggyking

You can store data in a class variable. After you have read in the user's input and verified that it is good, store it into a class variable to make it available to other methods in the class. To pass the data to another class's method, you can call that …

Member Avatar for NormR1
0
115
Member Avatar for Stevo812

Is this the same problem? [Link Anchor Text](http://www.java-forums.org/java-applets/57603-moving-ball-dragging-mouse.html

Member Avatar for NormR1
1
1K
Member Avatar for Syrne

What you are doing is changing the contents of the Student object and adding the same object reference to the arraylist so you end up with the arraylist containing references to the one and only Student class object whose contents are set to the last values. Make a new Student …

Member Avatar for Syrne
0
164
Member Avatar for CodeMonkeyJunk

Pass a reference to the array in a method call or have a method that returns a reference to the array

Member Avatar for CodeMonkeyJunk
0
417
Member Avatar for ringo_tech

Can you make a small, simple program that compiles, executes and shows the problem?

Member Avatar for ringo_tech
0
179
Member Avatar for tabicat91
Member Avatar for NormR1
0
131
Member Avatar for syed30

Do you have any specific java coding questions? Your questions seem to be looking for someone to write code for you instead of asking how to do something in java.

Member Avatar for Ezzaral
1
509
Member Avatar for Majestics

Post the full text of the error message. You have left off the important part.

Member Avatar for Majestics
0
283
Member Avatar for foxy_123

> Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException at application.applicationView.actionPerformed(applicationView.java:825) There is a variable on line 825 with a null value. Look at that line and find the variable with the null value. Then backtrack in the code to find out why that variable does not have a valid non null value.

Member Avatar for foxy_123
1
192
Member Avatar for mehnihma

> Thread is stuck somewhere? To find where the code is executing, add lots of println statements to your code that will record where the program is executing. The print out will show you what the code is doing.

Member Avatar for mehnihma
0
168
Member Avatar for darkseeker

> I couldn't compile the BookTest.java. Please post the full text of the error messages.

Member Avatar for NormR1
0
127
Member Avatar for zach1

Start by reading the file line by line. Why do you want it in a 2D array? What goes into the two dimensions?

Member Avatar for NormR1
0
238
Member Avatar for drameshgar1

Put the images into JButtons as an icon and click on the button to select it.

Member Avatar for 117
0
129
Member Avatar for mehnihma

What happens when you execute the code? Do you get the results you want? If not, please explain.

Member Avatar for mehnihma
0
157
Member Avatar for srinidelite
Member Avatar for JamesCherrill
0
82
Member Avatar for andisss

At line 40 there is an index to an array that is past the end of the array. The index has a value of 16. Look at line 40 and see how large the array is and what controls the value of the index is that is being used there. …

Member Avatar for NormR1
0
191
Member Avatar for jshort89

Is the paint() being called when you expect it to be called? Are the images being loaded properly so they can be drawn?

Member Avatar for NormR1
1
331
Member Avatar for raviaaaa

> class com.scand.jtree.TreeApplet.class not found. Where is the class definition for the class: com.scand.jtree.TreeApplet.class class? The name of the class looks like a filename NOT a class name. A class name would not end with .class. Where are you specifing the class name? Remove the .class from the end of …

Member Avatar for NormR1
0
191
Member Avatar for LdaXy

What statement does the exception occur on? what is the value of the index when it occurs? The code needs to test array indexes and not use any that are past the end of the array. Remember array indexes are zero based: 0 to the length-1

Member Avatar for NormR1
0
161
Member Avatar for SD91

To see the results of your code, add a println statement that prints out the value of the variable after its value is changed. The printout will show you what the code is doing. Your code does not change the value of something.

Member Avatar for SD91
0
112
Member Avatar for Thermalnuke

> whether the weather attributes are consistant or not. Can you define what the correct values are? What should the code do if the values are wrong?

Member Avatar for NormR1
0
184
Member Avatar for Bradoz

How do you get access to each term in a polynomial? Can you access only the first term in poly2 and use that with poly1.

Member Avatar for NormR1
0
313
Member Avatar for RinzLove

You pass values between classes and methods by getting a reference to the class with the method you want to call and calling a method in that class. TheClass aRef = <get a reference to the classs somehow> aRef.someMethod(<The value to pass>); // call the method in the class and …

Member Avatar for NormR1
0
263
Member Avatar for helpsie

> java.lang.NoSuchMethodError: main You need to provide the standard main() method in the class that you try to execute with the java command.

Member Avatar for helpsie
0
888
Member Avatar for devninja
Member Avatar for sugir1987
Member Avatar for sugir1987
Member Avatar for raviaaaa

> ava.net.MalformedURLException: unknown protocol: c It looks like you are using a URL with an invalid protocol. Some valid protocols: http: ftp: file: The c is probably from a path: c:/path/.... Add a valid protocol to the URL you are using. > class com.scand.jtree.TreeApplet.class not found. Where is the class …

Member Avatar for NormR1
0
315
Member Avatar for shawnv100

I think you will need some kind of driver that will connect to java to get data from a serial port.

Member Avatar for shawnv100
0
267
Member Avatar for lotto91

> use get methods.It seems like the value I get is 0 What method are you calling that is returning a 0?

Member Avatar for lotto91
0
82
Member Avatar for kubiak

Its tricky to get the buttons to be drawn after you draw the image. One thing you should override the paintComponent method for swing classes.

Member Avatar for zeroliken
0
222
Member Avatar for TheFlyingOwl

> listen for tab being pressed? Print out the event passed to the listener and see what is passed to it when tab is pressed.

Member Avatar for NormR1
0
303
Member Avatar for fatzky_04
Member Avatar for fatzky_04
0
320
Member Avatar for Shakeylfc

Use the String class methods to get the parts of the input String. Use the Integer class method to convert a String part to an int. When the parts are separated they can be put into the places where you want them to go.

Member Avatar for javalover
0
103
Member Avatar for NormR1

How do you wrap code in tags. This OP had a problem doing it: See http://www.daniweb.com/software-development/java/threads/418944/choice-and-text-area-convert-number-to-word `String var = null; forIint i etc // end`

Member Avatar for Dani
0
137
Member Avatar for Valiantangel

> i am not able to invoke line 41 owner.pets[ 3 ].getAction();? Do you get compiler errors? If so please post them. Otherwise explain what the problem is. Note: the getAction() method returns a String that your code ignores.

Member Avatar for JamesCherrill
0
116
Member Avatar for vijiraghs

Are there any third party packages that parse RDF files? It looks like XML. Does it have the same syntax rules? If so there are packages for parsing XML files.

Member Avatar for NormR1
0
172
Member Avatar for Ralphael

> I am having troubles updating the interface Please explain what your problem is.

Member Avatar for NormR1
0
646
Member Avatar for Valiantangel

This new forum formatting of posts is awful. The code you posted is very confusing with the way it comes and goes out of formatting. Where was the ^ in the original error message? You should not need a this. in the println() statement.

Member Avatar for JamesCherrill
0
157
Member Avatar for tleverington1

You should use the equals() method to compare Strings. The == operator mostly is for primitives.

Member Avatar for NormR1
0
100

The End.