2,777 Posted Topics
Re: Actually isEmpty isn't enough, the String needs to be longer than what is being stripped off the front. | |
Re: Where in the code do you look for the problem area? Could you mark the location with a comment like: // *** HERE IS THE PROBLEM *** and then tell us how you have marked the code so we can look there. | |
Re: Have you done any searches for code samples? | |
Re: Its hard to recommend coding changes without any code to look at. | |
Re: If you don't know which of the two variables is null, add a print statement before the if statement to print out the values of each so you can see which is null. Also print out the values of a and b. | |
Re: When using arrays of objects, there are two steps. One: create the array object. (Yes arrays are very like objects) Two: fill the array with the objects You probably have not done step two. textFieldArray[i][j] = new TextField(); // set i,j element to a TextField | |
Re: Please start your own thread and not hijack someone elses. | |
Re: [QUOTE]quit the slang as it makes it necessary to read your posts at least twice.[/QUOTE] Or maybe more times. Use full English. There are people in non-English speaking countries that use the forum and your gibberish will be doubly hard for them to understand. | |
Re: Get an editor or IDE, design the program and type in the code, compile and execute it. Debug, make changes, compile and execute. Continue until you have what you want. | |
Re: What code on the server does your java program talk to? What protocol is used? | |
Re: Are you looking for help with this program? If so could you explain in more detail what your problem is. [QUOTE]But I cant create arrays and store datas from reading text file[/QUOTE] Can you explain this better? | |
Re: That would be up to the writer of the B class. | |
![]() | Re: Also look at the Graphics class. It has methods for controlling display. ![]() |
Re: One thing I see in your posted code is that you fall thru to set the textfield out of the catch phrase. Why not have the setText() call before the catch? Also the error message does NOT show what the invalid data is. Another suggestion is to do a printStackTrace … | |
Re: The problem with the code you posted is the () after JButton. Remove them and it should compile. | |
Re: Could you repost your code with proper formatting and without the blockquote stuff? | |
Re: But your wasting everyones time by posting these type of questions vs needing programming help. Write a code snippet that shows the problem and ask questions about how to make the code do what you want it to do. | |
Re: [QUOTE] i want to test different set of elements in the array by looping.[/QUOTE] Do you know which set of elements you want to check? In the example you wanted to look at 0,1 and 9. Are there other sets of specific indexes to check? Are there always exactly 3 … | |
Re: Also try debugging your code by adding print statements to show what is in the operation variable after it is read: System.out.println("operation=" + operation + "<"); | |
Re: You have left off what you have done so far. Do you have any specific questions about the program you have to write? You'll get better help if you show some effort in solving the problem. | |
Re: A comment on your code: ALWAYS do something in a catch block to show you when there are errors. [QUOTE]object combo gets duplicated, if I again click [/QUOTE] Where do you clear the combo box before adding the new items? | |
Re: Go read some more about using the PopupMenu class. You need to use the show method. Perhaps a search on a java forum would find some code samples. | |
![]() | Re: [QUOTE] trying to reduce the number of *.class files [/QUOTE] Not sure how having static classes will [B]reduce[/B] the number of class files. There should be one for each class, even though there is a single .java source file. ![]() |
Re: Could you give an example of what your expected output would be for the input of: 34526? Think about how you would convert a String of "34526" to a decimal value in an int variable. Each digit character has a value 10 times the next one (for a decimal number). … | |
Re: Why have you started a new thread instead of continuing the old one? Can you answer the questions I asked you about your program on the old thread? | |
Re: Could you post a version of your code that will compile and execute and demo your problem? | |
Re: The posted code needs a definition for the Vocab class. | |
Re: Break the problem up into separate steps and do one step at a time. For example: prompt for a sentence and read in the sentence and print it out. See the Scanner class for a way to read in a sentence. Many code samples on this forum if you use … | |
Re: What does Google say about secure FTP? Does it exist? | |
Re: You're two years too late on this one. | |
Re: [QUOTE]number3 = new Program4(number1.add(number2));[/QUOTE] What is the signature for the add() method? What args does it take and what does it return? Program4 is a weird name for a class. Shouldn't it be something like Fraction? You should post the program assignment directly and not require a pdf download. | |
Re: Please use code tags when posting code. Icon to upper right | |
Re: Is the problem with the command you are trying to execute or with the OS reading the autorun file and properly trying to execute some command. For example what happens if you use open=Notepad.exe? | |
Re: [QUOTE]error saying "Bound mismatch: The generic method sort(List<T>) of type Collections is not applicable for the arguments (ArrayList<Score>). The inferred type Score is not a valid substitute for the bounded parameter <T extends Comparable<? super T>>"[/QUOTE] Which line in your code is causing this error? | |
Re: [QUOTE]NoSuchMethodError: main [/QUOTE] Your class needs a main() method if you are going to start execution in that class by using the java command: java FPCameraController The java command looks for and calls the static method: main when it starts executing a class. | |
Re: Create Calendar objects, get the epoch times for each, subtract and divide. | |
Re: [QUOTE]my output only produces the last set of values. [/QUOTE] How does the posted code relate to the problem with sorting and outputting only the last set of values? Where does the program save any values at all except for the last ones read? You need to save the all … | |
Re: [QUOTE]The applet UI should simply permit selection of a file for upload from the local directory structure.[/QUOTE] Will the applet have permission to read files from the local system? | |
Re: What do you get when you Search or Google ? | |
Re: Have you tried using the equals() method with the two objects that are in the ArrayList to see what it returns? Does the Variable class have its own equals method or does it use the Object class's method? If you don't have your own method, you probably need one. Read … | |
Re: [QUOTE]if a middle name is not entered that it just ignores that it is not there[/QUOTE] Do you know how to use the if statement? Build your output String (displayed on lines 23-25) in steps using concatenation controlled by if statements. | |
Re: Can you use the SwingUtilities method ONLY for the GUI interface calls and let your code run on its own, non EDT, thread? Can you make a small simple program that compiles and executes to demo the problem? | |
Re: Do you know how to define a class? You must if you have written any java programs. Can you explain specifically what problem you are having adding a class? What kind of class do you want? Inner or external? public or ? | |
Re: [QUOTE]i get thrown a Null Pointer Exception.[/QUOTE] What line is the error occurring on? What variable is null? What is the value of i when the error occurs? | |
Re: [QUOTE]it does not work correctly to check for the uppercase, lowercase, or the digit.[/QUOTE] Could you show an example where the code does not work properly. Comment out the JOptionPane and just assign a value to the input variable that shows the problem. Is the method supposed to show all … | |
Re: [QUOTE] Every attempt I make fails[/QUOTE] Please copy and paste the error messages here. | |
Re: First you need to read the API doc to see what classes JApplet extends. Add an @Override statement before all the methods you are trying to extend to see if they are in a super class. | |
Re: [QUOTE]the user only can input 5 times[/QUOTE] There are many ways to count what happens. The most common one is to use a loop. | |
Re: Sorry, we're here to help you learn how to program in java. If you have code that you are having problems with, please post it with your questions and we'll help you get your code to work. |
The End.