2,777 Posted Topics
Re: Please enclose your code in code tags. Use the above right end icon. | |
Re: Please post on the forum the questions and your problems solving them. | |
Re: [QUOTE]its not running as it should[/QUOTE] Please explain. Also copy and paste here the console output for when the program is executed showing what is wrong and add comments showing what the output should be. Please edit your code and surround it with code tags. See icon above to right … | |
Re: [QUOTE] preventing me from compiling[/QUOTE] IF you are getting errors, please copy the full text of the error message and paste it here. | |
Re: You need to scale the pixels to the number of degrees covered by the map. You need the lat/long of the upper left corner and for the lower right corner. Given those, you can convert any mouse click's x,y to a lat/long. There may be some trigonometry required at higher … | |
Re: [QUOTE]it didn't work[/QUOTE] Please explain. Its best to setVisible [B]after[/B] everything has been added to the frame. To convert an applet to an application, treat the applet's GUI code as a panel (Which applet extends) and add that to the frame. Then add calls to the applet's methods that are … | |
Re: [QUOTE]there are countless logical issues[/QUOTE] Please list as many of the issues as you can. ![]() | |
Re: Can you explain the problem(s) you are having? Does the code compile? Does it execute? Are the results incorrect? | |
Re: See cross post at [URL="http://www.javaprogrammingforums.com/awt-java-swing/5421-creating-custom-panel.html"]http://www.javaprogrammingforums.com/awt-java-swing/5421-creating-custom-panel.html[/URL] | |
Re: Is this the same topic and problem as this: [URL="http://www.daniweb.com/forums/post1348833.html#post1348833"]http://www.daniweb.com/forums/post1348833.html#post1348833[/URL] Why start a new thread? | |
Re: When posting code please surround it with code tags. Use icon above to right. Can you post specific questions about where you are having trouble? If you get compile or execution errors, copy and paste the full text here. If the program's output is not what you want, show the … | |
Re: Or to see the whole array, use the Arrays.toString() method to print out the elements on one line enclosed in []s | |
Re: You forgot to post the code you are having problems with along with specific questions about that code. Waiting for your code... | |
Re: It is better to use the length attribute of the array to compute positions in the array instead of hardcoding a literal like 9 or 10. If you change the size of the array, your code won't work. | |
Re: The value returned by getLength() is an int. The max int value is in the billions. Have you tried creating a very large packet to see if there are system limits? | |
Re: [QUOTE]I can't seem to do the high, low and current scores part. [/QUOTE] YOu need to work on the steps necessary to solve your problem before trying to write the program. How would you find the highest number if someone handed you pieces of paper with numbers on them one … | |
Re: Which call to JOptionPane are you referring to? Try debugging your code by adding print out statements to show execution flow and variable values as they change. | |
Re: Can you give a sample date that would format to what you want? I don't know about the Q1 but the JAN should be possible. What have you tried with the SimpleDateFormat for "JAN FY2010"? | |
Re: [QUOTE]put all my "drawing code" inside the overridden paint method, all the graphics get painted at the same time[/QUOTE] Make each part of the drawing code depend on some controlling variables like a boolean that are set by the Timer or listener code before it calls the repaint method. The … | |
Re: [QUOTE]why do i need to use inheritance here?[/QUOTE] Why do you think you need to extend Foo there? What happens when you try to compile it without the extension? | |
Re: Please edit your code and add code tags to make it more readable. Use the upper right icon. A comment on your coding style - Use self documenting variable names, not single letters s.compareToIgnoreCase(d) <<< what does this compare? | |
Re: [QUOTE]how to pass this information to my other methods in addition to having the option for user input via the menu.[/QUOTE] Use if/else logic. In pseudo code: If there are args, load the values for the method calls from those args else If there are no args, ask the user … | |
Re: How will using a jframe help solve the problem? The conversion method would not require any GUI. Break the problem up into two parts: the GUI the conversion | |
Re: Look at the ImageIO class and JLabel class. There are code samples here if you'd use Search. | |
Re: What java code do you have so far? Do you have any specific questions about how to write java code Or are you looking to hire a programmer to write some java code for you? Look at the System.out.println() method for writing to the console Look at the Scanner class … | |
Re: See comments on cross post at [URL="http://www.java-forums.org/new-java/33025-extract-strings-array.html#post146509"]http://www.java-forums.org/new-java/33025-extract-strings-array.html#post146509[/URL] | |
Re: Can your java program or html page use a URL that calls the PHP script? | |
Re: Cross posted and answered many times at [URL="http://www.javaprogrammingforums.com/object-oriented-programming/5387-basic-math-expression-java-problem.html#post17876"]http://www.javaprogrammingforums.com/object-oriented-programming/5387-basic-math-expression-java-problem.html#post17876[/URL] and [URL="http://www.javaprogrammingforums.com/whats-wrong-my-code/5392-basic-math-expression-java-problem.html"]http://www.javaprogrammingforums.com/whats-wrong-my-code/5392-basic-math-expression-java-problem.html[/URL] | |
Re: [QUOTE]problem is when one player keeps a key pressed then the other key event does not execute[/QUOTE] Is there a referee that could prevent one player from cheating? What is the flow of events to the key listener? Are there only event coming from the pressed key until that key … | |
Re: [QUOTE]need to fix the remove and save method[/QUOTE] can you explain what needs to be fixed? Show what the code is currently doing and explain why that is incorrect and what it needs to do. | |
Re: [QUOTE] I'm confused of why the balance is negative. [/QUOTE] Normally that is caused by an over withdrawal. What does your code do if an attempt is made to with draw more than the balance? Try debugging your code by adding print outs showing the values of the variables as … | |
Re: Could you add some comments in the code showing where you logic needs help. For example: // **** HERE I NEED HELP GETTING ELEMENTS INTO ARRAY ****** [QUOTE]want to do is every time I enter array position and value, it is stored and calculations performed[/QUOTE] [CODE] int index = // … | |
Re: What do you expect the print out to look like? To print each number on a new line you need to add a new line character to the String being printed. Add \n at the end of the String being printed. | |
Re: How can you set the elements of an int array to objects? | |
Re: Does the code you posted compile? If not, copy full text of error messages and paste here. | |
Re: Is this the same topic as this: [URL="http://www.daniweb.com/forums/thread314416.html"]http://www.daniweb.com/forums/thread314416.html[/URL] Why not continue on the old thread? | |
Re: I don't understand your problem. If you have an ArrayList containing Student objects, what is it you what to do? | |
Re: A suggestion so that everyone is working on the same problem. Make a few changes to your code to remove the need for a user to enter data by having the answers already in a String in the program. Move the Definition for Scanner Input to the class level and … | |
Re: Have you looked at the Thread class and the System class? One of them might have some tools you could use. | |
Re: What java programming courses have you had before this course? This is not a beginning programming assignment. When doing a big program, you need to break it down into small parts that you can write code for and test separately and then merge the working code/techniques into the large program. … | |
Re: [QUOTE]it keeps saying i need another perentheses[/QUOTE] What is the "it"? Do you get errors when compiling the program? What is the { on line 13 for? | |
Re: Do a Search for ImageIO. The ImageIO class will read images. | |
Re: Can you document what the code is supposed to do? How can anyone comment on whether the code does what it is supposed to do, if there is no statement saying the code is to do ..... | |
Re: Do a Google search would be a way to find out. The problem with an exe file is that it only works with one OS. | |
Re: What happens when you execute the code you show? do you get the desired values? | |
Re: There are tutorials in the Java Tutorials that explain how to use layout managers. | |
Re: It looks like you left off the -jar option with the java command. The missing class in the message looks like the path to the jar file: .Users.tstacey95.Desktop.Pythagorean.jar For executing jar files use the -jar option on the command line: java -jar Pythagorean.jar | |
Re: A quick and easy way, when debugging code, to see what is in the args[] array is to print out the Arrays.toString(args) value. It will show you the contents of args. [QUOTE] it is defined as a Scanner above in the try catch block[/QUOTE] The variable is defined inside of … | |
Re: Your posted code won't compile. It is missing definition for ColorCell. |
The End.