2,777 Posted Topics

Member Avatar for javalover
Member Avatar for NormR1
0
331
Member Avatar for swy

Can you edit your post and wrap the code in code tags? Use the [CODE} icon above the input box. The unformatted code is hard to read. Where do you print the lines you show? Where do you give values to the variables that are being printed as null and …

Member Avatar for NormR1
0
226
Member Avatar for razakhan

Cross posted at: [url]http://www.javaprogrammingforums.com/whats-wrong-my-code/13796-bit-strings-java.html#post57004[/url]

Member Avatar for NormR1
0
335
Member Avatar for 47pirates

What do you mean by "bit"? In computer terminology a bit is 1/8 part of a byte. It is hard to add a bit to a String. You can only work with bytes (8 bits).

Member Avatar for JamesCherrill
0
105
Member Avatar for harinath_2007

Are there any error messages when you execute the jar file? To see the error messages, open a command prompt, change to the folder with the jar file and enter: java -jar <THEJARFILENAME>.jar Copy the contents of the command prompt window and paste here. If on Windows: To copy the …

Member Avatar for DavidKroukamp
0
784
Member Avatar for rushikesh jadha

Use the javac command to create the .class files Use the jar command to create the jar file.

Member Avatar for rushikesh jadha
0
313
Member Avatar for beetlejuice

Using extra threads without the extra cores will slow down the program. Searching an x by y rectangle for a match could take up to x*y gets to find it.

Member Avatar for NormR1
0
183
Member Avatar for scheppy

[QUOTE]No method named "StringValue" was found in type "java.lang.String".[/QUOTE] The compiler can not find a method called StringValue for the String class. Where did you see that defined as a method? What is the type of the value you stored with the key of "type"?

Member Avatar for JamesCherrill
0
257
Member Avatar for MichaelCJ10

Comparing an double to a specific int value might be a problem. Why not just test if the value is less than 0. Try debugging the code by printing out the value that is read in to make sure the computer is getting what you expect for input. Can you …

Member Avatar for DavidKroukamp
0
263
Member Avatar for Thermalnuke

Take a piece of paper and write on it the input word and write underneath each letter of the word its position in the word, starting with 0 for the first letter. Then select the letters that are above the even numbers.

Member Avatar for Thermalnuke
0
138
Member Avatar for brandon66

Can you explain your problem? Does it compile? Does it execute? Do you get errors? Please post them here. Show what the program outputs and add comments to it to show what the output should be.

Member Avatar for brandon66
0
156
Member Avatar for Hypnos_16

[QUOTE]the two rectangles to move back and forth across frame horizontally[/QUOTE] To move horizontally you need to change the x values. Your code has the locations hardcoded. The variables created in a method disappear when the method exits. You should define the shapes outside of the paintComponent method where they …

Member Avatar for NormR1
0
2K
Member Avatar for behrad kiani

[QUOTE]there is a problem in computepath method[/QUOTE] Please explain. Show what the code is currently doing and explain what is wrong with that and show what it should be doing.

Member Avatar for NormR1
0
246
Member Avatar for raj.mscking

Cross posted at [url]http://www.java-forums.org/new-java/54895-encryption-decryption.html[/url]

Member Avatar for JamesCherrill
0
150
Member Avatar for macdunk11

Your code assumes that the second input is OK without testing it and looping back to get a valid input if it is not. Write a loop that When getting input from the user, stays in the loop until the user enters a good value. Can you copy the console …

Member Avatar for hiddepolen
0
597
Member Avatar for techgeek420

[QUOTE] I have an understanding, on paper, of how to write the program[/QUOTE] Can you post a simple list of the items you are having problems with? Then we'll work on them one by one.

Member Avatar for NormR1
0
200
Member Avatar for bsabowala

If you want to package other R/O files in your jar file you will have to use the getResource methods to read the file. You should be able to put any input file into your jar file.

Member Avatar for DavidKroukamp
0
394
Member Avatar for sp85202

[QUOTE]memberList.parseStringToMember(inputInfo); <--error here[/QUOTE] Please copy and paste here the full text of the error messages.

Member Avatar for sp85202
0
330
Member Avatar for shotokanpoloto

[QUOTE]Exception in thread "main" java.lang.NullPointerException at java.io.Writer.write(Writer.java:140) at nfa2dfa.NfaToDfa.OutputFile(NfaToDfa.java:217) [/QUOTE] Look at line 217 where you call the write method and check the values of the variables

Member Avatar for NormR1
0
244
Member Avatar for EmbroideryEtc
Member Avatar for 47pirates

Have your code check the length of the username before submitting it. Refuse to except an invalid one.

Member Avatar for NormR1
0
121
Member Avatar for drameshgar1

What package(s) are the classes you are using in? Do you have some API doc for the classes in that package?

Member Avatar for NormR1
0
260
Member Avatar for jasonrefan

[QUOTE] it is aware that there is an error[/QUOTE] What is the "it" that is aware? What error is there? [QUOTE]it CONTINUES to write to the file regardless.[/QUOTE] Is the writing to the file controlled by the value of a variable? Where is the variable given a value? Is the …

Member Avatar for NormR1
0
125
Member Avatar for drico7041

You could use an if to detect the number, the question is where would you save the count. It depends on the range of numbers. If a small range you could use an array.

Member Avatar for drico7041
0
185
Member Avatar for behrad kiani

[QUOTE]it has to show character c[/QUOTE] To see the binary value of a char you can do this: [CODE]System.out.println("c=" + Integer.toBinaryString('c') + " " + (int)'c'); // c=1100011 99[/CODE]

Member Avatar for JamesCherrill
0
325
Member Avatar for Upoma
Member Avatar for jot121

That's an interesting usage of the count variable as an index. What value do you expect it to have on line 26?

Member Avatar for NormR1
0
125
Member Avatar for sike.mausa
Member Avatar for riahc3

What is the navigator program you are using? Do you understand the difference between the http:// protocol and C:/ ? The first requires a server.

Member Avatar for riahc3
0
102
Member Avatar for pseudorandom21
Member Avatar for DavidKroukamp
0
186
Member Avatar for emclondon

Where is TimerListener defined? Why doesn't the compiler see it? Are the packages hiding it?

Member Avatar for ~s.o.s~
0
637
Member Avatar for scheppy
Member Avatar for skoon

Cross posted at [url]http://www.javaprogrammingforums.com/whats-wrong-my-code/13630-backtracking-maze.html[/url]

Member Avatar for NormR1
0
292
Member Avatar for jasonrefan

[QUOTE]how to tell java that when it reads the empty line, that's the end of the record.[/QUOTE] Can you explain your problem here? When the code reads an empty line, the code knows that it is at the end of the record and goes to do what ever needs to …

Member Avatar for DavidKroukamp
0
129
Member Avatar for nlyn
Member Avatar for shade399

[QUOTE]after calling the method the user has selected, I want them to be able to select another[/QUOTE] Wrap the code in a while or do while loop that requires input from the user to exit.

Member Avatar for DavidKroukamp
0
144
Member Avatar for Vampiricx3

[QUOTE]how to actually display it within my JTextField[/QUOTE] Can you explain how you want the data to be displayed? Show what the program currently does and explain what you want to change.

Member Avatar for NormR1
0
126
Member Avatar for sugir1987

[QUOTE] help me to clear the error?[/QUOTE] You forgot to post the error. Please copy and paste here the full text of the error message.

Member Avatar for NormR1
0
191
Member Avatar for nlyn

Is this the same problem as this: [url]http://www.daniweb.com/software-development/java/threads/408144/1742169#post1742169[/url]

Member Avatar for Philippe.Lahaie
0
91
Member Avatar for Thermalnuke

[QUOTE]what is the public VOID init used for[/QUOTE] You need to read about how applets work. Here's a link to the middle of the tutorial on applets: [url]http://docs.oracle.com/javase/tutorial/deployment/applet/appletMethods.html[/url]

Member Avatar for stultuske
0
256
Member Avatar for battlex2010

[QUOTE]How can i make the client side of the application search the network for the server socket? [/QUOTE] Is that like trying to find someone's telephone number? You have to know it if you are going to call it.

Member Avatar for battlex2010
0
197
Member Avatar for bigredaltoid

[QUOTE] prompting the user to enter an integer[/QUOTE] Look at the Scanner class for an easy way to read input from a user via the console. Basically you print out a request, read in the user's response, check that it is a valid number and then test if it's prime.

Member Avatar for bigredaltoid
0
162
Member Avatar for webdragon89

If you use the print() method without a newline character ('\n') the output will go on the same line. If you want future output to go on the next line use either the println() method or add a newline character: '\n' where you want the end of the current line …

Member Avatar for hiddepolen
0
641
Member Avatar for cloud02

[QUOTE]I want to change the program and output should be like this:[/QUOTE] What does the current output look like? What is the difference between what the program does now and what you want it to look like? Please be very specific in describing the differences.

Member Avatar for cloud02
0
193
Member Avatar for skoon

Cross posted at [url]http://www.javaprogrammingforums.com/whats-wrong-my-code/13567-problem-maze-program.html[/url]

Member Avatar for skoon
0
416
Member Avatar for sugir1987

Have you read the API doc for the ArrayList class? Do any of its methods look like they would "insert" an element into the list? Have you tried any of the methods to see what they do? Try writing a small, simple program that creates an ArrayList and add elements …

Member Avatar for NormR1
0
173
Member Avatar for emmas4impact

[QUOTE]i need to use the keyboard or the mouse to click on the number printed on the moving[/QUOTE] Please explain what you are supposed to do.

Member Avatar for emmas4impact
1
2K
Member Avatar for cadamsjr

[QUOTE]what the actionPerformed should pass to the while [/QUOTE] Can you write a list of the steps the program should take to do what you want? The normal GUI program shows the user a form and waits for the user's input. When the user clicks on a button the action …

Member Avatar for cadamsjr
0
192
Member Avatar for LogicalOutlier

For debugging your code I'd recommend you add printlns to show the values of variables as they change and to show the execution flow. The print out should help you understand what the problem is. You forgot to show what the correct output should be.

Member Avatar for NormR1
0
192
Member Avatar for LogicalOutlier

You could use the Graphics class's drawLine method to make a grid. You show a component like a JButton by adding it to a container that is in a GUI that is visible. This would create a run method: public void run() { }

Member Avatar for NormR1
0
735

The End.