2,777 Posted Topics

Member Avatar for summey
Member Avatar for NormR1
0
214
Member Avatar for getack

The program should be event driven not spinning in a loop. The code waits for the user to do something (an event) and then reacts to that event. It is not executing in a loop while it is waiting. It has returned to the JVM and waits for the JVM …

Member Avatar for rfq
0
3K
Member Avatar for noobies

You need to read the tutorial about how to write GUIs. [url]http://docs.oracle.com/javase/tutorial/uiswing/index.html[/url]

Member Avatar for NormR1
0
196
Member Avatar for jackmaverick1

Put the diagram in code tags and see it that preserves the formatting [CODE] ---------- | | | | ---------- [/CODE] [QUOTE] but what if it's both above, and to the side?[/QUOTE] Can you explain what you mean.

Member Avatar for NormR1
0
120
Member Avatar for xiiopao

Take a look at this: [url]http://docs.oracle.com/javase/tutorial/java/javaOO/methods.html[/url]

Member Avatar for NormR1
0
183
Member Avatar for Hypnos_16

[QUOTE] missing return statement[/QUOTE] The compiler thinks there should be return statement where it shows this error. [QUOTE]unreported exception java.io.IOException; must be caught or declared to be thrown[/QUOTE] Enclose that statement in a try catch block. Be sure to add a call to the printStackTrace() method in that catch block.

Member Avatar for NormR1
0
275
Member Avatar for bibiki

Try debugging your code by having it print out all of the variables values involved. The print outs will show you what the code is doing.

Member Avatar for NormR1
0
154
Member Avatar for bloodbender
Member Avatar for svatstika
Member Avatar for jouj
Member Avatar for life4menu

See the posts on this thread: [url]http://www.java-forums.org/java-applets/56280-create-moving-points-respect-time.html[/url]

Member Avatar for dennysimon
0
215
Member Avatar for shean1488

I don't know if a regexp will do that. Perhaps someone that knows will come along and suggest a solution. You might be able to use the String class's indexOf and substring methods.

Member Avatar for J_A_L
0
20K
Member Avatar for leiger

Does an overload of createFont() method take a URL instead of a File? The classpath for code in a jar is the jarfile which is NOT useable in a File constructor. Add some debugging code to print out the values returned by the various method calls you are using. To …

Member Avatar for karlmeier
0
4K
Member Avatar for crazymidget01

[QUOTE]holds an unknown number[/QUOTE] If you don't know the number of pairs and must use an array, then two passes might be needed. A better approach would be to use an ArrayList which will automatically resize if needed.

Member Avatar for NormR1
0
224
Member Avatar for dennysimon

Looks like the Nokia Suite changed the registry and didn't restore it to its old value when it was uninstalled. Reinstalling the JRE may restore the registry so the OS knows how to execute a jar file.

Member Avatar for dennysimon
0
647
Member Avatar for jasonw749

[QUOTE]have the text clickable[/QUOTE] What does "clickable" mean? Do you want an event when the text is clicked on? Is the text part of an image, not a String you are adding to a component? Where and what is the text and what kind of component is the text in?

Member Avatar for jasonw749
0
178
Member Avatar for coderN

Try a loop that looks at the contents of each of the arrays. That assumes that all the arrays are the same length.

Member Avatar for NormR1
0
113
Member Avatar for lena1990

There are several ways to give applets permission: sign the jar file the class files are in add an entry to the .java.policy file on the PC where the applet is being executed See the tutorial for more info: [url]http://docs.oracle.com/javase/tutorial/deployment/applet/index.html[/url]

Member Avatar for NormR1
0
376
Member Avatar for LFCFan_07

[QUOTE] it is not doing what I want it to.[/QUOTE] Where does the code create the barcode String? Add some printlns to that code to print out the values of the variables as they are set and changed. The print out will show you what the code is doing. If …

Member Avatar for NormR1
0
200
Member Avatar for apanimesh061
Member Avatar for justindill

Where are the variables that are referenced in the error messages defined? The compiler can not find their definitions in the LineItem class.

Member Avatar for NormR1
0
144
Member Avatar for Eye_Kneed_Help

When posting code please put it in code tags to preserve the formatting. Use the (CODE) icon above the input box. Your unformatted code is harder to read and understand.

Member Avatar for ztini
0
253
Member Avatar for maxinville

> problem here is it will pass an empty field If the value is a String the String class has methods you can use to detect an empty String. Please post any code you have questions about here on the forum. Be sure to wrap the code in code tags. …

Member Avatar for maxinville
0
688
Member Avatar for vuquanghoang

[QUOTE]It throws StackOverFlow every time I complile project. [/QUOTE] Do you mean you get the error when you execute the program. Compiling it should not give a stack overflow. The program is probably in a recursive loop and not stopping until it runs out of memory. Add some println statements …

Member Avatar for NormR1
0
249
Member Avatar for chuffedlion
Member Avatar for Gazzmonkey

[QUOTE]method start() is undefined for the type roundabout02.carProcess[/QUOTE] The compiler can not find the method: start() in the class: carProcess. Where is that method defined?

Member Avatar for JamesCherrill
0
802
Member Avatar for adil_bashir

A return statement can return one item. That item could be an array with any number of elements. Think of what you can put on the right hand side of an assignment statement statement.

Member Avatar for NormR1
0
103
Member Avatar for rampletero

Cross posted at [url]http://www.java-forums.org/advanced-java/56506-help-drawing-tex.html[/url]

Member Avatar for NormR1
0
198
Member Avatar for xcrypted1

Have you read the API doc for the Graphics2D draw() method? Are you calling it with the correct arguments? Does the ArrayList class have a getX() method? If the ArrayList contains points, and two points define a line, would you want to get two points from the ArrayList and draw …

Member Avatar for NormR1
0
579
Member Avatar for dennysimon

The is the String returned by the default toString() method. If you want to see something from the Value class add an override to the toString() method to the class and return the string that you want to see.

Member Avatar for dennysimon
0
148
Member Avatar for tabish saroha

Add an else at the end of the if/else if chain and have it print out the contents of the event object. That handles the case where none of the above were true. You should always add an ending else to catch unexpected cases & problems.

Member Avatar for NormR1
0
132
Member Avatar for bluealein56

[QUOTE]getting the the user input for the loan terms and loan interest to work[/QUOTE] Can you explain what "to work" means? Can you explain what you are trying to do and what your problem is?

Member Avatar for NormR1
0
252
Member Avatar for Vampiricx3

[QUOTE] detect if the code contains the "null" part [/QUOTE] The String class has methods for comparing the contents of a String. The consoleWrite() method could use an if statement with a String method to see if its second argument is the String: "null"

Member Avatar for ~s.o.s~
0
95
Member Avatar for km2011

Please print out the contents of the array and explain what is wrong with its contents and show a sample of what it should look like. The Arrays class's toString() method is useful for formatting a single dim array for printing.

Member Avatar for NormR1
0
681
Member Avatar for hasan_cemos
Member Avatar for bloodbender

The technique you are using looks like a recursive call. Eventually the program will run out of memory. Not likely when it requires user input for each loop. A way to avoid recursive calls would be to use a loop that uses the user's input to control it looping back …

Member Avatar for stultuske
0
130
Member Avatar for whateverme
Member Avatar for NormR1
0
51
Member Avatar for Gnawk

[QUOTE]Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 16 at ArrayProcessing.countAndDisplay(ArrayProcessing.java:135)[/QUOTE] The code at line 135 uses as index value that is past the end of the array. Look at the code and see why the value of index gets past the end of the array. Add printlns to print out the index's …

Member Avatar for NormR1
0
118
Member Avatar for lassy85

[QUOTE]will not display the cd information [/QUOTE] Can you give us a clue on how/where the data is to be displayed? Where does the info come from? Where is it to be displayed? I see some catch blocks that do NOT call the printStackTrace() method. You need to add calls …

Member Avatar for lassy85
0
191
Member Avatar for Skraight

Can you copy and paste here the console? Instead of an image. To copy the contents of the command prompt window: Click on Icon in upper left corner Select Edit Select 'Select All' - The selection will show Click in upper left again Select Edit and click 'Copy' Paste here.

Member Avatar for NormR1
0
158
Member Avatar for lena1990
Member Avatar for lena1990
0
222
Member Avatar for dsmith12

You don't ask a question or say what your problem is. Does your code work? If not explain what the problem is and give some examples where the code does not work. Add some println statements to print out the values of the variables that are being used.

Member Avatar for NormR1
0
447
Member Avatar for exonwarrior

Try looking at the JPopupMenu class. There are links to the tutorial from its API doc that show how to use it.

Member Avatar for NormR1
0
99
Member Avatar for DontQueef

Do you have a specific question or problem with your code? [QUOTE] I just want some IDEAS or maybe sniplets of code for my last method[/QUOTE] This is the last method: public static void printString What help do you need with that???

Member Avatar for NormR1
0
123
Member Avatar for learner15
Member Avatar for Zennie2005

[QUOTE]I am having trouble with the main programming [/QUOTE] Please explain your problems. Copy any error messages and paste them here. If the program's output is not what you want, copy the output here and add comments describing what is wrong with it.

Member Avatar for Zennie2005
0
161
Member Avatar for allan2020

How are you keeping the random number used on line 32 within the bounds of the array? In the RandomNumbr method you have a hardcoded: 50. Your code should use the size of the array, not a fixed number.

Member Avatar for NormR1
0
190
Member Avatar for darria

Do you have any specific java programming questions? or problems? Post them.

Member Avatar for peter_budo
-1
141
Member Avatar for htp367

Can you edit your post and wrap the code in code tags? Use the [CODE] icon above the input box. Unformatted code is hard to read and understand.

Member Avatar for NormR1
0
339
Member Avatar for Zennie2005

The End.