2,777 Posted Topics
Re: [QUOTE]starts a new game window that is ALL blank[/QUOTE] What should the window show? And when should it show it? [QUOTE]but then went blank [/QUOTE] What made it go blank? Look at the logic of the code to see why the above is happening. | |
Re: Remove the "my" from the [mycode] tags to get the correct code tags | |
Re: Do you have a specific question about the program you are writing? | |
| |
Re: [QUOTE]How do I get the program to wait until information on all cats have been inputted before returning the answer that fits the "if" [/QUOTE] Are you gathering the info inside a loop? Where is the end of the loop? Move the question/"if" outside of the loop so that it … | |
Re: Look at encrypting and decrypting the password. Look at using the javax.crypto package. No idea how to use it. Best google for some samples | |
Re: Have you tried printing out the values being tested before the tests? System.out.println("characters.size()=" + characters.size() + " vs eS=" + expectedSize); FOr all three arrays after their references are set? | |
Re: [QUOTE]the set returned by getFruits()[/QUOTE] It'd help if you defined what type of data (the java class) is returned by the getFuits() method. | |
Re: The output you've posted is hard to understand. Can you show the ordering you would like for the characters: a A b B c C 1 2 | |
Re: Have you tried a small test program to work out the details on this technique? Something you could post here for others to work with. | |
Re: [QUOTE]how to link them to my draw method.[/QUOTE] Normally you draw in the paintComponent() method for the GUI component that is to show the drawing. The GUI collects the input from the user (rect coordinates) and waits for the user to press a button. The action listener for the button … | |
Re: Everything in the computer is in binary, I assume that its the representation of that binary data as Strings that you are talking about. What data type do you have as input and what type do you want as output. For example if the input is an int and the … | |
Re: [QUOTE]Whatever I try,[/QUOTE] Can you show us what you have tried? [QUOTE]set the cells to the correct values[/QUOTE] What values does it set them to? | |
Re: Also what is it supposed to do? | |
Re: [QUOTE]how to make this work[/QUOTE] I think we'll need a fully working program to solve this. Can you make a small program that executes and demos the problem? | |
Re: For java programs you use the java command to run the program. | |
Re: Please use code tags when posting your code. Please copy full text of error message and paste it here. Here is a sample: [QUOTE] TestSorts.java:138: cannot find symbol symbol : variable var location: class TestSorts var = 2; ^ [/QUOTE] | |
Re: When testing Strings for equality, use the equals() method. The == operator does not test the contents of an object. It tests if two pointers point to the same object. Also look at the method that ignores case. | |
Re: Extent the blah JPanel class and override its paint method with your drawing code. | |
Re: Try debugging your code by adding println() statements to show execution progress and how variable values are changing. It would help someone trying to look at your code quickly if you'd put a comment in the code like: // **** LOOK HERE **** AND tell us to look for that … | |
Re: How do you know if anything was returned by the readLine()? Add a println("temp=" + temp +<") statement immediately after the readLine() to show what was read. Maybe it has read a 100 lines and is waiting for 101st. Also you could use the available() method to see if there … | |
Re: Try debugging your program by adding println() statements to show where it is executing and how the variables are changing value. | |
Re: How are you executing the program? Are you using the java command? The error message says you entered: java HomeField.HomeField as the commandline. Try java HomeField | |
Re: Read the API doc for the split() method. Where (what index) in the array returned by split() would the desired word be? | |
Re: [QUOTE]i have many errors that i cannot solve[/QUOTE] See 3. above. We can't help you without the full text of the error messages you are getting. | |
Re: Are you saying that The server is at that IP address and the client uses that address in a Socket trying to connect to the server? Is there a firewall or other software involved? | |
Re: You have defined many String[] selection as local variables. When execution moves out of the {} enclosing the definition, the variables are no longer defined. Move the definition of selection out of the methods to where it is in scope for the methods that need it. Read up on "scope" … | |
Re: [QUOTE]variable DvdTitle might not have been initialized[/QUOTE] Where is the variable: DvdTitle initialized? The compiler wants you to assign it a value before you try to use it. | |
Re: Write the program in steps. First step is to read in the lines from the file. To verify its working, use System.out.println(...) to show them. When you can do that, we'll move on to the next step: parsing out the values you want. | |
Re: Where is the return for the true condition of the if statement? | |
Re: Read the Java Tutorial about network programing. You'll need to understand how to use Sockets, HTTPConnections, URLs and InputStream classes. Also reading about HTML and and the HTTP protocol will help you understand how clients and servers communicate. | |
Re: Can you explain what you are trying to do and what the problem is? Recommendations: Don't be so lazy when typing in the names of variables. Give them names that mean something. Do Not use short names like: n, i, y, c. [CODE]name=n; id=i; year=y; course=c;[/CODE] Instead of reading into … | |
Re: Your conversions from month of year (int) to the name of the month looks weak. Anytime there is a bunch of repetitive if's like that look to put the data in a collection of some kind with a lookup or direct indexing. The list of ifs should be if{} else … | |
Re: Read the API doc for the String class to see how to get each character one at a time. See the Integer class for how to convert an String character to an integer. | |
Re: [QUOTE]<identifier> expected[/QUOTE] The compiler is looking for a data type like int or double. Look at how to define a method. | |
Re: Please copy and paste any error messages here. If no errors, explain your problem. | |
Re: [QUOTE]creates a crash[/QUOTE] When you get errors, please copy and paste the full text here. | |
Re: Use the javac command to compile a java program. There are NO requirements for any methods in a class to be able to compile it. | |
Re: See also other thread on same topic: [URL="http://www.daniweb.com/forums/thread295305.html"]http://www.daniweb.com/forums/thread295305.html[/URL] | |
Re: Please put posted code in code tags. Unformatted code is hard to read. What are your problems? Can you ask specific questions about them? | |
Re: [QUOTE] allows users to login[/QUOTE] What does login mean? Using an applet implies that there is a server somewhere that the applet is loaded from. If there is no server, then the program should be an application not an applet. [QUOTE]without using a database[/QUOTE] Yes there is no need for … | |
Re: Code test = new Code (var1, var2, var3); yes, that looks Ok if the Code class constructor takes 3 args and types of the args match the constructor. | |
Re: Please use code tags when posting code. Also please add some comments to the code describing what it is you want the code to do. | |
Re: No, you can't create variables like car01 at runtime. You can use a Map(like HashMap) and save data in it using a key = "car01" with any value you want. | |
Re: [QUOTE] configure the server[/QUOTE] Read the doc for the server and see what it says about FTP. | |
Re: [QUOTE]package the database in the jar file [/QUOTE] You can add files to a jar file by using the jar command. | |
Re: Say a row = a line and a column a word on that line. Create a 2 dim array with first dim >= number of lines in file Read in file and parse words of each line into an array and add that array to the first array at its … | |
Re: You need to use another collection of some type to accumulate the counts for each of the elements in the array. One class to use could be a Hashtable with the element as the Key and the value as the count. For a small range of integers, you could use … | |
Re: They're a tool to allow giving a class you define a type. | |
Re: Look at the Process and Runtime classes. |
The End.