2,777 Posted Topics

Member Avatar for PHIPH

What paths do you need to set? What version of Windows are you on? The main change is to add the path to the JDK's bin folder containing the javac commmand to the System's PATH variable. To see what you currently have, open a command prompt window and enter: PATH. …

Member Avatar for NormR1
0
65
Member Avatar for sirlink99

Did you read the API doc for the read method? What does it return? Is it a String or something else? What did you see in the JLabel? Try printing out the value of inFile as an int. Then print it casting it to a char and see what you …

Member Avatar for NormR1
0
276
Member Avatar for masterofpuppets

How is the browser asking for the image? Is because of an HTML tag like <IMG SRC= Does the browser do an HTTP GET to the server and the server calls your code to send the bytes? What format is the browser expecting the image bytes to be in?

Member Avatar for masterofpuppets
0
9K
Member Avatar for sirlink99

Does the JPanel have the focus? Can it receive the focus? Not all components can get the focus. Some times you must "register" the component to receive focus. See the API doc for these two methods: requestFocus() and setFocusable()

Member Avatar for sirlink99
0
518
Member Avatar for wizzwig

[QUOTE]with Java the [B]bison and flex[/B] is abit confusing because its in C[/QUOTE] Can you explain what you are referring to here? [QUOTE]using java to construct the compiler.[/QUOTE] Does this mean you are to write a compiler in java? With bytecode output that can be executed by the java command?

Member Avatar for JamesCherrill
0
209
Member Avatar for PHIPH

I agree with both of the above. An IDE makes too many things appear to be magic. Best to do it manually a few times to see what is going on before going on to an IDE.

Member Avatar for jwenting
0
182
Member Avatar for sirlink99

Change your logic so you don't create a new JFrame in Drop's constructor. Or in the mousePressed method don't create a new Drop object.

Member Avatar for sirlink99
0
132
Member Avatar for xThrash

First you need to find the algorithm for the selection sort and distill it down to steps that can be programmed. What is the code you posted supposed to do? It needs a few comments to describe what each section is to do.

Member Avatar for NormR1
0
2K
Member Avatar for baby_c

[QUOTE] a way to find out how many array elements are initialized like this[/QUOTE] No easy way. You have to look at each element and see how it is set. Arrays are pretty dumb. If you use a collection class like an ArrayList, you can ask it how many items …

Member Avatar for baby_c
0
187
Member Avatar for coding101

Have you taken a piece of paper and pencil and worked out the details on how the pointers change when working with a LL? [QUOTE] insert 1, how to accomidate[/QUOTE] Where should the pointers be after a 1 is inserted?

Member Avatar for NormR1
0
99
Member Avatar for matthewkeating

[QUOTE] getting error saying that the datatype for arraySum is not applicable for sortNumbers[/QUOTE] Please copy and paste here the full text of the error message. [CODE]int randomNumbers[] = {(int)(100.0 * Math.random()) + 1};[/CODE] What do you want to happen with this statement?

Member Avatar for matthewkeating
0
427
Member Avatar for Majestics

[QUOTE] i want user to select column1 first then he choose column2 according to column1 and column3[/QUOTE] Can you explain what you are trying to do? I select a row in column 1 and then select an item in the dropdown list. And then what?

Member Avatar for Majestics
0
234
Member Avatar for stevanity

Please post the full text of the error message that shows which line the NullPointerException occurs on.

Member Avatar for stevanity
0
2K
Member Avatar for new_developer

Have you tried to compile your code? Does it give compiler errors? You'll save some time if you compile it first before posting it with errors you don't know about.

Member Avatar for JamesCherrill
0
48K
Member Avatar for kukuruku
Member Avatar for tom543
Member Avatar for tom543
0
194
Member Avatar for vextorspace
Member Avatar for eagl09

Also see this cross post where various techniques were suggested: [url]http://www.javaprogrammingforums.com/whats-wrong-my-code/9528-cannot-find-where-extra-brace-causing-my-errors.html[/url]

Member Avatar for rubberman
0
334
Member Avatar for ceyesuma

Why not start with a smaller program to get the techniques down. Then you could post it when you have problems. The posted code here is just too big for most people to work with.

Member Avatar for ceyesuma
0
124
Member Avatar for stevanity

Why are you adding components in the paintComponent method? That method can be called many times a second to do a repaint. Also your paintComponent doesn't do any painting?

Member Avatar for NormR1
0
966
Member Avatar for monica23
Member Avatar for nered
Member Avatar for JamesCherrill
0
107
Member Avatar for desert564

I don't see any debugging println statements that would tell you how each variable changes and how the execution flow goes. If you understand your algorithm and can see when your code is not following that algorithm by looking at how the values of variables change, then the output from …

Member Avatar for harinath_2007
0
1K
Member Avatar for corby

You need to put all the images in the jar file. When you do that, you will need to change the way the image files are read from using disk files to using resources. There is lots of code samples on the forum that does this. Search for getResource and …

Member Avatar for NormR1
0
165
Member Avatar for FALL3N

[QUOTE] Just add each dir containing compiled class files to classpath! [/QUOTE] Really you need to put the dir at the head of the package path on the classpath. If a class is in package mystuff.work, the class file would be in the work folder and the classpath should point …

Member Avatar for hfx642
0
371
Member Avatar for ssdeep

There is too much jargon in your question and not enough java. A lot depends on how you want to access the stored data and what you want to do with it while it is stored.

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

Cross posted at [url]http://forums.devshed.com/java-help-9/i-want-to-execute-my-jar-file-827597.html[/url]

Member Avatar for Majestics
0
113
Member Avatar for 2blew2b

When I execute it I get the following when I press the button: [QUOTE]Exception in thread "AWT-EventQueue-1" java.lang.NullPointerException at NewJApplet$1.actionPerformed(NewJApplet.java:74) at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)[/QUOTE] Look in the browser's Java console for error messages.

Member Avatar for pbl
0
151
Member Avatar for vomhaus

Does your code do what you want it to do? If not please explain the problem you are having.

Member Avatar for NormR1
0
163
Member Avatar for Zephnath

[QUOTE]the app does not satisfy the requirements[/QUOTE] Please explain what requirements you are missing. [QUOTE]assigning prices to the products and adding them for the total purchase value[/QUOTE] I'm assuming you have a Product class. Several ways to assign a price: in the constructor when the product object is created. Have …

Member Avatar for NormR1
0
2K
Member Avatar for trivax
Member Avatar for newcoder310

Down load and install the Tomcat server. It has examples that you can play with.

Member Avatar for newcoder310
0
65
Member Avatar for AhmedGhazey

I'm not sure of your question. By web page I assume you mean what is displayed in the window of a browser. What is "Click on webpage" mean? Are you trying to position the cursor over the browser's window and click on the spot on where a Submit button is …

Member Avatar for NormR1
0
150
Member Avatar for winecoding

What data type does the get() method return? What type is temp1? The == operator is for comparing primitives. For comparing the contents of objects use the .equals() method.

Member Avatar for JamesCherrill
0
177
Member Avatar for larrymtl

[QUOTE]Compilator ignores the scanner and directly goes to else statement and puts it in the loop 10 times...[/QUOTE] What is a compilator? The Scanner class is tricky to use. It reads a full line including lineend into a buffer and then returns parts of what was entered as you ask …

Member Avatar for larrymtl
0
245
Member Avatar for steve_Student

I see that the OP is still confused about % [QUOTE]£100 + 0.97% = £109[/QUOTE] 1% of 100 is 1 .97% of 100 is .97

Member Avatar for NormR1
0
290
Member Avatar for steve_Student

Your uncommented code makes it hard to understand what you intend the code to do. For example what is the 1000 that is used two times in this statement: intrest = Math.abs(intrest *1000+.5)/1000; For better readability use a final int with a selfdocumenting name: final int ConvertFactor = 1000; Also …

Member Avatar for Ezzaral
0
312
Member Avatar for olsane

@coding101 How about explaining to the OP the trick in the second for statement. Spoon(Shovel) feeding a student with code he can copy and paste is not always the best way to get the student to think thru a problem and work out the solution. You learn by trying and …

Member Avatar for NormR1
0
93
Member Avatar for coding101

You've shown the file contents in text record format. Ie each record ends with a line end. The records can all be different lengths. To be able to use a RandomAccessFile to get to records randomly, each record must be the same length. Then the position of a record = …

Member Avatar for NormR1
0
130
Member Avatar for bufospro

Are you having problems? Can you explain what the problem is? Look at using a Timer vs writing your own using Thread. Also its better NOT to use one of the standard Java class names for your class.

Member Avatar for mKorbel
0
99
Member Avatar for lili.edryana

Go to the Java tutorial and read about generics. Start here and find generics: [url]http://download.oracle.com/javase/tutorial/reallybigindex.html[/url]

Member Avatar for NormR1
0
107
Member Avatar for trivax

[QUOTE]java.lang.NoClassDefFoundError: AddFrame[/QUOTE] Where is the class: AddFrame. The JVM can't find it. You must have all the classes needed by the program on the classpath. One way this is done is by putting them all into a jar file. This must be done carefully to preserve the package paths to …

Member Avatar for trivax
0
149
Member Avatar for zhealz12

The import statement is a way of telling the compiler where to look for class definitions when the class is in a package. It saves you from having to code the full package name when you use a class. Without the import java.util.Scanner; statement, you would have to code java.util.Scanner …

Member Avatar for NormR1
0
121
Member Avatar for aiwasen

[QUOTE] how do I return a value if I made another choices again and again..[/QUOTE] How do the additional choices effect what value is returned? Do you return one value for each choice or one value after all the choices have been made? Normally you talk about returning a value …

Member Avatar for peter_budo
0
163
Member Avatar for akasekaihime

[CODE]if ((grade>=90)||(grade<=100)) {)[/CODE] Does this return true if grade is 20? (note: 20 is < 100 so the second condition is true and the whole OR connected condition is true) Do you want both conditions to be true or only one of them? Both requires AND only one requires OR

Member Avatar for ztini
0
111
Member Avatar for akasekaihime

ztini seems to like to show off that he can write code, instead of helping students learn how to write code. Teach a man to fish vs giving him a fish.

Member Avatar for peter_budo
0
164
Member Avatar for nattienat7

You need to save the previous total and add to it the new total. Where do you compute the total that is displayed in error? Where do you update it?

Member Avatar for ztini
0
561
Member Avatar for student.09

Where do you output the value of salary? If it's printed on the console, please copy and paste the program's output here to show us what is output. A debugging technique is to print out the value of a variable every time it is changed. Print with an id String …

Member Avatar for NormR1
0
161
Member Avatar for iwannalearn

First, have you read the API doc for those two methods? How have you seen them used? Do you have a code sample?

Member Avatar for NormR1
0
603
Member Avatar for gingerfish

The OP should try debugging his code to see what is happening. If no interactive debugger available, add printlns to the code to show the execution flow and how the values of variables change.

Member Avatar for gingerfish
0
921

The End.