2,777 Posted Topics
Re: [QUOTE]makes the timer does not work[/QUOTE] What does not work? Is the timer called when it should be? Add print outs to show that it is. or is it the logic in the actionPerformed method that is wrong? Again add print outs of all the variables to show how they … | |
Re: The first two characters are the code for a zip file. Rename the file to .zip and try using a zip reading program | |
Re: Before coding you should work out the algorithm you want to code. Given an amount, you find the largest coin the fits, compute out how many, subtract those from the total and do it again until nothing is left. | |
![]() | Re: Try debugging your code by adding printouts of all the variables you are using to see where you are going wrong. For example: System.out.println("dte=" + dte + "<"); System.out.println("index1=" + index1); ![]() |
Re: For testing I suggest that you use the Scanner class with a String in the program to provide input to be inserted into the BST. This will make the debugging much easier. [CODE]String InputData = "First line\nSecond line\nthird line\n"; // Define the lines to read ... Scanner scnr = new … | |
Re: [QUOTE]code to restrict the users input to 5 numbers[/QUOTE] I don't think you can restrict then number of characters a user types in at the console. Are you asking how to keep a user from entering: 23456789 You can't Can you explain what the problem is? | |
Re: A question about your technique: Why are you in the JDK's bin folder vs in the folder with the parts to build your jar file? Add the JDK's bin folder to the PATH environment variable. Check the order of the jar command options with the order of the files on … | |
Re: Can you show us the code you have now and explain what your problems are with it? To determine if a characters is a vowel or consonant you need to do some kind of lookup. One way would be to have a String of each and use indexOf to see … | |
Re: There is a method in the AppletContext class that allows an applet to request the browser to show a web page. I don't know how an applet in one page can communicate with another html page in the browser. Maybe there is some javascript code that can do that. | |
Re: Cross posted at [URL="http://www.java-forums.org/new-java/32831-homework-help-involving-comparing-color-objects-strings.html#post145408"]http://www.java-forums.org/new-java/32831-homework-help-involving-comparing-color-objects-strings.html#post145408[/URL] | |
Re: Can you explain what you want to build and what tools you have to build it with? Are you talking about creating an html page? Or what? | |
Re: [QUOTE]Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException at java.text.SimpleDateFormat.parse(SimpleDateFormat.java:1214) at java.text.DateFormat.parse(DateFormat.java:335) at view.formActions.RegisterFormActions.bookingRegisterAction(RegisterFormActions.java:979) [/QUOTE] Is RegisterFormActions your program? Look at line 979 and see why it is causing a NPE. | |
Re: [QUOTE]As you can see my output is not whats needed[/QUOTE] You could help us a lot by showing us EXACTLY what is wrong and what is needed. Your error message should show the values for the names that do not match!! When comparing objects such as Strings you must use … | |
Re: Take a piece of paper and draw a rectangle representing the applet's area. Place your String where you want it in that rectangle. Draw some lines from the left side of the rectange to the begining of the String and from the top of the rectangle to where the String … | |
Re: [QUOTE] implement a 2D vote table[/QUOTE] You need to define your problem a lot more. You are using a lot of jargon about your problem without relating it to java programming. | |
Re: [QUOTE]where to change the value of shapeCount[/QUOTE] Can you describe what the shapeCount variable is used for and when/why you want to change its value? | |
Re: [QUOTE]how to do the file handling in java applet? Do I have to do the certain policy/permission to perform it[/QUOTE] Applets can only handle files from where they were loaded. If you load an applet from a website, it can only request files from the server it was loaded from. … | |
Re: Look at the Properties class. It has methods to read properties files. | |
Re: I guess that the key code is 0 Try printing out ev and see if the toString() output has anything useful | |
Re: [QUOTE]how can i open a java.policy file?[/QUOTE] Or do you mean: [COLOR="Red"].[/COLOR]java.policy as it is on a Windows system. Use the policytool that comes with the JDK. Its in the bin folder with the other tools. | |
Re: [QUOTE] where the error is[/QUOTE] Can you show us the error message? Or explain where the error is? Have you read the doc for the classes and package you are using? What status code does the server return? | |
Re: Can you explain what your problem is? Please post your questions here and not in an attachment. If you're too lazy to structure you questions for posting, then we'll wait until you do. ![]() | |
Re: What code do you have? Do you have any specific questions about your code? | |
Re: Your manifest contents looks wrong. Here's one that works for me: [QUOTE]Main-Class: SlideShow.ImgIdxEditor Class-Path: DocumentViewerWParser.jar [/QUOTE] | |
Re: I don't see where you posted the text of the error message from the compiler. Please copy and paste here the full text of the error message. | |
Re: [QUOTE]There's something wrong with this code.[/QUOTE] Do you know what is wrong? Do you get errors? Copy and paste the full text here. Do you get wrong results? Copy and paste here the results with an explanation of what is wrong and show what you want the results to be. | |
Re: [QUOTE] Am trying to get 'my robot' to recgonise the difference between 'blue' and 'red'[/QUOTE] I don't see any comments in your code describing what it is doing so am unable to help you change it. Try debugging your code by adding print outs of all the values of the … | |
Re: Read the API doc for JTextField for a method to put data into the textfield. | |
![]() | Re: Please explain about the error. Where is it? When does it happen? Is it compile time or execution time or logic. What is the program supposed to do? One BIG problem I see is that you don't use a layout manager. Also please use code tags when posting code. See … |
Re: Look at the String class's split method for one way to separate a String into parts. | |
Re: [QUOTE] i have a problem in modifying the code to remember the index of the score.[/QUOTE] Can you explain which score you want to remember the index to? | |
Re: [QUOTE]I keep getting an error.[/QUOTE] please copy the full text of the error message and paste it here. Please use code tags when posting code. Use the icon above to right of input area. | |
Re: [CODE]int date = 01/01/2010;[/CODE] Would it compile better if we changed it to int date = 01+01+2010; | |
Re: Do you have any specific java programming questions? Is your problem with designing an algorithm to solve a problem Or do you have a design/algorithm and need help writing the java code for it? | |
Re: You forgot to post the code you are having problems with. Also you need to ask some questions. | |
Re: Can you explain what your problem is? How are you looking at each character on the line read from the file for the desired character? Look at the String class for methods to get individual characters from the String. You will need a loop to look at each character in … | |
Re: [QUOTE]is there any way i can solve this?[/QUOTE] Yes, you could solve that problem by writing a java program. [QUOTE]i got a question about random number[/QUOTE] What is your question? Please be more specific that just stating the problem/assignment description. | |
Re: You forget to post the code for what you have so far. And/or your questions about your problems with writing the code. | |
Re: [QUOTE]how to add items into my hashmap with ID being the key and name info and quantity being the values. [/QUOTE] To have more than one item as the value, you will have to create a new class to hold all of the data items. Does the Product object hold … | |
Re: [QUOTE]structure that reflects that of a document stored in a plain txt file. [/QUOTE] You don't define what the layout/structure is for the txt file. What is the relationship between lines and tokens on a line with the objects you want to create? | |
Re: Or make it more readable by adding an id to what you print out: [CODE]System.out.println("factorial for " + input + " is " + new Factorial(input).getFactorial());[/CODE] | |
Re: Cross posted at [URL="http://www.java-forums.org/new-java/32630-adding-link-jtable-cell.html#post144372"]http://www.java-forums.org/new-java/32630-adding-link-jtable-cell.html#post144372[/URL] | |
Re: [QUOTE] write the hashed password into the output file[/QUOTE] That's like putting the house key under the door mat. If someone decompiles your code, they have your passwords. | |
Re: [QUOTE]i keep getting a runtime error.[/QUOTE] please copy the full text of the error message and paste it here. I can't see your screen from here, so I'll need your help so I can see what the problem is. If you are on Windows: To copy the contents of the … | |
Re: Are you asking for help writing a java program? Or are you asking to hire a programmer to write you a program? Have you tried google? | |
Re: [QUOTE]The issue I am having is I can not seem to get the nested loops to properly sum the total for each query.[/QUOTE] Can you show what the program outputs, explain what is wrong with that output and show what you want it to output. The only debugging technique I … | |
Re: Can you upload an html page and a jar file to the server? Then use the URL of the html page to load the html page with the applet into the browser. | |
Re: [QUOTE] I wanted the code to substitute strings, using permutiotions [/QUOTE] Could you show us what the code currently does and also show us what you want it to do with some examples? |
The End.