2,777 Posted Topics

Member Avatar for AnkitKumar

There is just one Thread class. Read about the JVM to see how it uses threads.

Member Avatar for NormR1
-1
71
Member Avatar for kukuruku

The compiler doesn't see how a return would be done if the exception were thrown and the catch block executed. You need to add a default return. Perhaps a better way would be to assign the value to a new char variable inside the try{}catch. If that throws an exception …

Member Avatar for jon.kiparsky
0
329
Member Avatar for sirlink99
Member Avatar for sirlink99
0
122
Member Avatar for StormHawk

Are there two parts to your question? 1)draw the shapes of images in the BLUE rectangle to the right of the pane. 2)get a jpeg/png/tiff image from say photobucket or another online server, and draw it on there. There could be a problem here. Unsigned Applets are not allowed to …

Member Avatar for NormR1
0
155
Member Avatar for JSpudMonkey

Please copy and paste the full text of the error message. And show the full text of the line where the error occurs. For example Your posted source line was not ended by a ; You have lots of syntax errors and misplaced } I'm surprised your IDE let you …

Member Avatar for NormR1
0
282
Member Avatar for AhmedGhazey

Can you explain the algorithm you are using as comments in your code? Can you show the current output from the program and can you show what the output should be? You left off the import statements. The code will not compile without errors

Member Avatar for NormR1
0
180
Member Avatar for ankit.pandey3

Also: When posting errors, please copy and paste the full text Cross posted at: [url]http://forums.devshed.com/java-help-9/how-i-can-apply-blinking-in-chat-program-819056.html#post2646403[/url]

Member Avatar for ankit.pandey3
0
232
Member Avatar for Armanious

[QUOTE]it doesn't seem to work [/QUOTE] it would save time if you described what it is doing now (show examples) And describe what is wrong with it And show what you want the results to look like One way to show the contents of an array is to use the …

Member Avatar for jon.kiparsky
0
1K
Member Avatar for endisbegun

What do the install instructions say to do? You talk of policy files(extension=.policy) and of jar files(extension=.jar). What were the file names of the files you installed?

Member Avatar for NormR1
0
879
Member Avatar for tirambad
Member Avatar for sirlink99

Add some println statements to show the values of the variables as they change and are used. The output should show you where your logic is wrong. For example: System.out.println("xaxisWave1[z][360]=" + xaxisWave1[z][360] + " for z=" + z);

Member Avatar for sirlink99
0
159
Member Avatar for harinath_2007

calls to repaint should cause a later call to paintComponent? Is paintComponent being called? Add printlns to show call to repaint and call to paintComponent.

Member Avatar for JamesCherrill
0
300
Member Avatar for Dorar

It depends on what the SubUser (subUser using standard naming conventions) does. If it doesn't do any Swing GUI things or run too long, it should be OK. What does the subUser method do?

Member Avatar for NormR1
0
173
Member Avatar for AhmedGhazey

How does this relate to Java programming? It looks like a Comp Sci problem.

Member Avatar for NormR1
0
143
Member Avatar for sirlink99

[QUOTE]I am having trouble separating them.[/QUOTE] Not sure what this means? Your code appears to try to get the source component for the event. Print out what is returned by the getSource() method. You are assuming that it is a String. Also read the API doc for the getSource method. …

Member Avatar for sirlink99
0
126
Member Avatar for sirlink99

Can you post the code you are describing? How did you call repaint()? Have you added debug println statements to verify which repaint() calls are being made and which paint methods are called and in what order?

Member Avatar for NormR1
0
342
Member Avatar for sandyho

[QUOTE]pages = input.nextDouble();[/QUOTE] Number of pages is usually a whole number. Can your app have 4.2 pages?

Member Avatar for mKorbel
0
314
Member Avatar for hemaaaa

Cross posted at: [url]http://forums.devshed.com/java-help-9/i-dont-know-any-thing-819566.html#post2647066[/url]

Member Avatar for NormR1
0
184
Member Avatar for winecoding

Read the JDK doc about how to use the java command. Basically enter: java CLASSFILENAME where CLASSFILENAME is the name of the .class file. If in a package there is more to it than that. No idea how Eclipse works.

Member Avatar for jon.kiparsky
0
264
Member Avatar for JSS540

If you call the newly created GUI object, do you expect the label to change for an existing GUI object? You need a reference to the existing one to change its label.

Member Avatar for JamesCherrill
0
1K
Member Avatar for C:\>

[QUOTE] only results in stuff like sun.net.www.protocol.http.HttpURLConnection$HttpInputStream@1ce669e,sun.net.[url]www.protocol.http.HttpURLConnection[/url][/QUOTE] Is that the output from the toString() call? Looks like info about the class object your created. What did you expect to see for a URL object? [QUOTE]This gives me the pure HTML code.[/QUOTE] Does that include the javascript code?

Member Avatar for NormR1
0
140
Member Avatar for WolfShield

[QUOTE] at java.awt.Container.add(Container.java:927) at jPad.jpad.<init>(jpad.java:18)[/QUOTE] You'll need to know how to read the error message. Here are two lines with some info. Read from the bottom up until you find your java class. (jPad) That line has the source line where the error occured: 18 and shows what method you …

Member Avatar for WolfShield
0
148
Member Avatar for WolfShield

Read the API doc for the String class. Does it have a setFont method()? To find which classes have the setFont() method go to the API doc page. At the top of the page is a link labeled: INDEX Click that and then click on the letter S. Do a …

Member Avatar for WolfShield
0
137
Member Avatar for lynnajoe

Look at line 65 in your code. The condition contains an assignment statement. Is that what you want?

Member Avatar for JamesCherrill
0
131
Member Avatar for bibiki

[QUOTE]it says that the class uses a deprecated API[/QUOTE] Can you post the full text of the error message? If you don't have the source, can you post the Machine.class file. There are utilities that can show what classes and methods it uses. For example, try decompiling it.

Member Avatar for bibiki
0
151
Member Avatar for lovelyrose26

Scanner class can be tricky to use. Scanner reads and saves what you enter in a buffer and then returns tokens to the next... calls except for the nextLine call which returns it all. Write a simple test program to test the different next... and has... methods to get a …

Member Avatar for NormR1
0
91
Member Avatar for monsterbb1

Please edit your code and add CODE tags to preserve the formatting. See [url]http://www.java-forums.org/misc.php?do=bbcode#code[/url] If you want your text field all by it self at the top of the window, you'll need to use another layout manager. You can nest your usage of layout managers. Have one for the textfield …

Member Avatar for NormR1
0
260
Member Avatar for cannadawoot

[QUOTE] an easy solution for creating new arrays while runtime[/QUOTE] use the new statement to create a new array. After creating them and filling them, they can be added to the ArrayList.

Member Avatar for cannadawoot
0
192
Member Avatar for tasu

I don't know how to do it in netbeans. In java, you would add a listener to the button and when the button is clicked and the listener code is called, you would open the new form.

Member Avatar for StormHawk
0
80
Member Avatar for becool007

[QUOTE]because then the information wouldn't match.[/QUOTE] Can you explain what you are doing and how you can use java code to solve your problem? The use of the word script is confusing. Java is a compiled language. I think of scripts as being "executed" by an interpreter that reads the …

Member Avatar for NormR1
0
111
Member Avatar for aloyssia

When you run from a command prompt, you'll have fewer IDE things going on to potentally confuse you and will see the output from the JVM without any editting by the IDE. Also when you get past the development stage, and want to have the code be runnable from a …

Member Avatar for NormR1
0
188
Member Avatar for kwins

[QUOTE]implements ActionListener //Error: Absolute is not abstract method actionPerformed(java.awt.event.ActionEvent) in java.awt.event.ActionListener[/QUOTE] The text of the error message describes the problem. Remember that java is case sensitive. Check your spelling.

Member Avatar for NormR1
0
217
Member Avatar for jl.lakhnai
Member Avatar for turt2live
0
171
Member Avatar for turt2live

[QUOTE]Is there a way to set the contents of a JFrame to a jar file?[/QUOTE] A jar file contains files. Just about any type of file can put put in a jar file. In that context, what do you mean by the above? By putting the jar file on the …

Member Avatar for turt2live
0
189
Member Avatar for solomon_13000

I suspect that it is the age old problem of == and Object references. The == with object references tests if the two variables refer to the same object. Generate the byte code and look at it to see what the compiler is doing.

Member Avatar for jon.kiparsky
0
157
Member Avatar for hamzamuradkhanh
Member Avatar for Gata_Salvaje

The example you show is for String B to be 1/2 of String A, case ignored. Perhaps that is too simple an example. The indexOf method would give you that (both Strings changed to the same case). Do you have any more complicated examples?

Member Avatar for ztini
0
4K
Member Avatar for 24x24

[QUOTE]I tried using a variable that would contain the string which would be the location of the image and then setting that variable as a different string when the object is shot but that didn't work so well[/QUOTE] Why use a String instead of a class containing ints to hold …

Member Avatar for mKorbel
0
163
Member Avatar for komyg

Would the time displayed by the JavaScript code (via new Date()) be different from the time the java program would get from the system using some class?

Member Avatar for NormR1
0
290
Member Avatar for luisthedude
Member Avatar for saurabh2007

Read the API doc for the Scanner methods you are using. There is a section of the doc that describes the exceptions a method throws and the reasons.

Member Avatar for NormR1
0
516
Member Avatar for winecoding

Read about how to use the HTML APPLET tag. Create an html page using the Applet tag and make your class files available by putting them in a folder or in a jar file and have the Applet tag attributes point to their location.

Member Avatar for NormR1
0
81
Member Avatar for winecoding

Do you want its display to replace the page with the applet or to be displayed on the same page with the applet, say in a textfield?

Member Avatar for NormR1
0
164
Member Avatar for s.w.a

Add some debug code to print out the values of all the variables used in the expression and post them so we can see what the values going into the expression are. Copy and paste the console output here.

Member Avatar for s.w.a
0
199
Member Avatar for caierhui
Member Avatar for Feriscool

When the method WORD1 has the 4 letters required, have it do a return. Execution will then return to the main method where WORD2 will be called. See cross post at: [url]http://www.java-forums.org/new-java/43960-hangman.html#post208262[/url]

Member Avatar for NormR1
0
498
Member Avatar for SMITA6076
Member Avatar for Ezzaral
0
115
Member Avatar for mklein

See answer on other forum: [url]http://www.java-forums.org/new-java/44207-add-click-method-all-jlabels.html[/url]

Member Avatar for JamesCherrill
0
307
Member Avatar for breezi3

[QUOTE]I keep getting errors[/QUOTE] Please copy and paste here the full text of the messages

Member Avatar for NormR1
0
216
Member Avatar for Kprosser1029

The end of the program's code is missing. Could you explain what [B]my buttons arent working[/B] means

Member Avatar for NormR1
0
290

The End.