2,777 Posted Topics
Re: See the Math random() method and the Random class. Both will generate random numbers | |
Re: Please edit your code and wrap it in code tags to preserve the formatting. Unformated code is hard to read I suspect the codes are connect by their left and right reference pointers. No array needed. | |
Re: Where is the code that produces the image you show? The posted code when executed: shows a window with a single button on it. | |
Re: Sounds like you have a 'shadowed' variable. Two variables with the same name at different levels of scope. | |
Re: Where in your code do you see the value of the variable as it is incremented? Add a println to show its value every time it is incremented. Is the method being called two times when you think it is being called once? | |
Re: Can you explain your project a bit more? Does this have to do with algorithms for merging the contents of images? | |
Re: Interesting problem. If the computer is off, how do you execute a program? Do you have a second computer that is running and an electronic connection between the two so that the second computer can turn on the first one? | |
Re: Do you have a small test program with a text field that compiles and executes to demonstrate the problem? | |
Re: [QUOTE] it is showing some error which i can't solve or debug...[/QUOTE] When you get an error please copy and paste it here. That will speed things up for you. | |
Re: [QUOTE]same code i did previously couldnt give all the data[/QUOTE] Sorry, I don't understand what you mean. Do you mean that you did not read all the data in the file with the second code? How much did you read? Compare that with how much was read with the first … | |
Re: Will the user be using Eclipse to execute your program? Or do you plan on creating a jar file that can be copied to other locations? [QUOTE]How can I change the program to allow the user dynamically input the parameter after clcking "run Java application".[/QUOTE] How does Eclipse get involved … | |
Re: [QUOTE]Can anyone help?[/QUOTE] What do you need explained? Can you describe what is happening with your code, perhaps show the output and explain what is wrong with it and show what you want the output to be. | |
Re: [QUOTE]I am having some Issues arranging the buttons[/QUOTE] Can you describe the issues? | |
Re: Load the clipboard, position the cursor, right click and paste. | |
Re: Have you looked at how to read an HTML page with a form tag, parse out the parts you need to fill in and how to recognize the captcha image and display it? | |
![]() | Re: How do you want to access the words? Is a category a word? Or a phrase? Is it something that you search for? An idea: Map<Category, ArrayList<Word>> |
Re: What do you mean by "printing"? Do you want a copy of the GUI component and contents written/printed to paper? | |
Re: Here's how to copy and paste the command prompt: 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. Your posted code … | |
Re: Look in the browser's java console for an error message. | |
Re: Remember java coding conventions? G vs g for variable names | |
Re: Do you need a state flag that tells you where you are in the get input / show results cycle? Use the flag to clear out the current values shown and display the newly entered ones. | |
Re: Could you explain your algorithm? And the reason that it fails. | |
Re: Where are you displaying the String? In a text component or where? Different components have different ways of displaying text. | |
Re: [QUOTE]But it is not working as expected.[/QUOTE] No computers do what you tell them to do, not what you want them to do. What is it supposed to do? Can you explain the logic? Think about this: If input is Apple then it is not Orange | |
Re: also you could use an array to contain your choices and use the random number to index into the array. | |
Re: You forgot to post what the program currently outputs. Can you post your current code. | |
Re: Are there any error messages when you manually execute the program? Does your code ignore exceptions or does it use printStackTrace when it catches an exception? | |
Re: I see the thread is marked as solved. If you have solved your problem, could you please post your solution so the next person with the same problem can find the solution here. Thanks | |
Re: You need to do some more research on the classes you are using. For example what does the API doc for the DataInputStream class say it is used for? The data that is read is translated into an internal format, not into Strings. What happened when you used the BufferedInputStream? … | |
Re: Can you show the input and output of the program and describe what is wrong with the output and say what the output should be? [QUOTE]It should count the same word once instead of twice.[/QUOTE] How are you keeping track of what words have been counted so that you don't … | |
Re: Please edit your code and wrap it in code tags. See the [ code ] icon above the input area. Try debugging your code by: Add a println to your actionlist method to print out the values of the variables it is using. Add a trailing else clause at the … ![]() | |
![]() | Re: [QUOTE]I receive the client request to create a new album with the album name being encoded[/QUOTE] What kind of data type is the name received as? For debugging Can you print it out char by char using the String.charAt() and Integer.toHexString() methods to show the values of each character? Perhaps … ![]() |
Re: [QUOTE] when I load it the frame is clear for like 20 seconds[/QUOTE] Probably the Thread.sleep(20000); statement. Take that out it will speed up. | |
Re: A component can only have one parent. It can't be in two containers at the same time. | |
Re: Is this a java programming problem? If so, please post your code with questions or the problems you have having implementing the algorithm. Be sure to include documentation on the algorithm you are trying to implement. Or is it an algorithm design problem? | |
Re: Can you give us a hint? Is it a compile error, or an execution time error or a logic error? | |
Re: One way to return to an earlier piece of code is to use a loop: [CODE]begin loop do menu stuff check user's response do what user wanted go back to beginning of loop <<< this can be automatic or done by continue statement end loop[/CODE] | |
| |
Re: [codE]Calendar calendar = Calendar.getInstance();[/codE] [QUOTE] this does not update after the program has been launched.[/QUOTE] Its an assignment statement that puts the current value of something in a variable. If you want a new/current value assign it again now. [QUOTE] i want it to be able to count the number … | |
Re: Why post this more than once here? [url]http://www.daniweb.com/software-development/java/threads/371217[/url] | |
Re: See the answer on the other forum where you posted this question. ![]() | |
Re: Look at the String class and the Integer class. Both have methods to do that. | |
Re: Why do you think your translate and scale calls will create a mirror image? If you comment those two method calls out, the image is displayed. | |
Re: What kind of file are you reading? How was it created? It looks like it contains Unicode characters with a leading id character. Here is the contents of a file in hex that I created with Wordpad by selecting Unicode Text Document as the Save type: FFFE540068006900730020006900730020006100200074006500730074002E00 Notice there is … | |
Re: Please post the code on the forum. | |
Re: [QUOTE]create a registration form but it is not running[/QUOTE] Please explain what you want your code to do in more detail. Show what it does now and add comments describing how the output is incorrect and what you want the output to look like. | |
Re: [QUOTE]Is there any possible way to condense this three dimensional array into a two dimensional, or better yet, one dimensional array?[/QUOTE] Yes, define a mapping from x,y,z to i It might help if you took a piece of paper and wrote out a small 3 dim array with the x,y,z … | |
Re: Do you have a question about java programming? What message does your program put out if there are not two arguments? | |
Re: Check that your {}s are correctly positioned. For example where is the ending } for the class? All your code should be in a class definition. Is it? | |
Re: An idea for an improvement, use a drop down list to chose the colors instead of requiring the user to type them in. |
The End.