2,777 Posted Topics
Re: [QUOTE] it has an error[/QUOTE] What is the error? | |
Re: What is a cell shop? Part of a prison construction company that builds cells. Or does it have to do with zoology? | |
Re: Do you know how to program in Java? Are you trying to learn how to program in java? | |
Re: Can you edit your code and wrap it in code tags to preserve its formatting? Edit your post, select the code and press the [CODE] icon above the input box. | |
Re: What can be done with this class? It needs a main method and a lot more to be able to execute it to see the problem. | |
Re: [QUOTE]how to assign the variables to the numbers[/QUOTE] What variables? Normally you assign values to variables. Can you explain what you mean? Can you explain what you want this code to do? | |
Re: Where is the "Day of the Week" value to be displayed? Your current GUI doesn't have anywhere to display it. | |
Re: [QUOTE] the IDs are different[/QUOTE] What are the "IDs"? [CODE]tempTagText == tags.get(i).getTagName().toString()[/CODE] Use the equals() method to compare the contents of String objects. | |
Re: Try asking your question on a HTML or CSS or javascript forum. Java is different. | |
Re: Add some printlns to the showCases method to display the values of the variables that control whether it prints or not. | |
Re: What software is drawing to the screen when the Robot class gets a black image? Is the whole screen being drawn to or just a frame on the screen? | |
Re: [QUOTE]whether there is a way to recompile the class without restarting my GUI([/QUOTE] Yes you should be able to recompile the class without restarting your JVM. However, I don' think you will be able to load and use the new version of the class in the current JVM. Once a … | |
Re: Please post everything in the forum that is needed to ask your question. | |
Re: did you fix the testing for winner logic? If you click buttons: 1, 5 and 9 (diagonal upper left to lower right) it says Winner. | |
Re: Your code does not give a real value to the array variable: array You need to use the new statement to give it a value: array = new String[2000]; // create an array with 2000 slots After creating the array, you need to assign values to each of its slots: … | |
Re: Your error messages do not go with the code you posted. The error message: Name saveInfo; The code: EmpInfo saveInfo; Please change one or the other or both so the posted error message is for the posted code. Where are the classes Name and/or EmpInfo defined? The compiler can not … | |
Re: Can you show what the program currently prints out and explain what is wrong with that output? Also be sure to show what the input to the program was that generated that output. To copy the contents of the command prompt window: Click on Icon in upper left corner Select … | |
Re: [QUOTE] potential memory wastage[/QUOTE] Forget about this idea for a long time. With Mega and Giga byte machines, 10K doesn't mean anything. | |
Re: Normally drawing on a GUI component is done in the paintComponent method. The super call will immediately clear whatever was painted outside. | |
Re: What do you mean by "maximum value"? Do you mean the number of possible elements to be added to the array? If you don't know how many elements are to be added, then use a class like ArrayList which has no limit. | |
Re: [QUOTE]When I try to reference the objects using an array and index (arrayName[index]) in another nested class or even the main method i get null pointer exception errors[/QUOTE] Can you post a small simple program that executes and demonstrates the problem? | |
Re: Use the bitwise OR operator to set a bit in a byte. [CODE] byte x = 0; x = (byte)(x | 1); // set the low order bit x = (byte)(x | 0x80); // set the high order bit System.out.println("x=" + x + " " + Integer.toHexString((0xFF) & x)); // … | |
Re: Can you use the Scanner classes methods to parse the tokens/words that are entered into numbers? A word or token is a one or more characters separated by white spaces. If not then your code needs to build the words by concatenating single characters together until it finds a white … | |
Re: Instead of a switch statement you could use arrays to hold the values. | |
Re: [QUOTE]how to fetch any data back from the browser[/QUOTE] Have the browser load its html page from your code (make it a simple server) then when the browser sends a response to the html page it will go to your code. | |
Re: What does the Button class do? | |
Re: [QUOTE]can you show me how to draw a single line[/QUOTE] Create a class that extends JPanel, override the paintComponent method, add a call to the Graphics drawLine() to the paint method, add the panel to your GUI where you want to see the line. | |
Re: I assume you have the normal definition for average: the sum / count What is your problem doing this? | |
Re: Mercator had this problem with his maps. When you convert lat/long to x,y,z the distance between the points would be though the surface of the earth vs on the surface via a great circle route. No idea if you would get the same results. [QUOTE]I also have an algorithm that … | |
Re: Cross posted at [url]http://www.javaprogrammingforums.com/awt-java-swing/10562-efficient-way-build-tree-gui.html#post41064[/url] | |
Re: Are you having problems with your code? Can you explain what the problem is? If needed, Please post a small sample program that demonstrates the problem. | |
Re: Treat the args array that is passed to the main method just like you treat or use any other array. How do you get/check the number of elements in an array? The array object has a property that you can use to get that number. | |
Re: Please post the output you are seeing. If it's the Car class that is giving the hex codes, add a toString method (override the Object class's toString method) to the Car class that returns the String you want to see. | |
Re: [QUOTE]iterate through a string of alphabets until a digit is reached. [/QUOTE] Have you tried using the charAt() method that James suggested? The presence of "words" in a String will not be a problem with the charAt method. By words I assume you mean letters delimited by whitespace or punctuation. | |
Re: How are you saving the generated Strings? Could you also save its reversed contents in a list to test against? | |
Re: [QUOTE] I do have an error message which says "cannot find symbol on line 23.[/QUOTE] It would help if you posted the full text of the error message. Your post has left off important data. Please copy full text of error message and paste it here. Here is a sample: … | |
Re: [QUOTE]I need help with the Linked list[/QUOTE] Can you explain how you want to use the LinkedList class? | |
Re: Are all the email addresses in the first element of the args array? Your code doesn't test if the the args array to see if it's empty or has more than one element. How do you detect the end of one domain and the beginning of the next name? Answer: … | |
Re: System exit would quit the program skipping bye all callers. return goes back to the caller. | |
Re: [QUOTE]too many exception is appered[/QUOTE] please copy and paste them here if you want help resolving them. You have several problems that will require you to post some code showing what is happening for anyone to be able to help. Please wrap your code in code tags using the [CODE} … | |
Re: First thing to do would be to design the system. What do you want it to do? | |
Re: When do you get the error? Which programs do you execute in what order? What line of code does the error occur on? | |
Re: Did you note where the install put it files? Look in that directory for the bin folder. The path to my version 7 bin folder is: D:\Java\jdk1.7.0\bin | |
Re: Look at the String class. It has a method for splitting a String into an array of Strings. Then look at the Integer class for a method to convert a String to an int. | |
Re: What program created the zipFile.exe file? Is there any documentation about how to execute the .exe it creates in batch mode? | |
Re: Do you have a question? | |
Re: [QUOTE]I do not know in particular to use mouse listeners,[/QUOTE] Read up in the Java Tutorial. Go to this site and Find Mouse Listener [url]http://download.oracle.com/javase/tutorial/reallybigindex.html[/url] | |
Re: [QUOTE]calculating the source of the shortest distance part of A,B,C,D,E,F,G.[/QUOTE] Can you define how a distance is measured? What do the letters A,B,C,D,E,F,G represent? Please edit your code and wrap it in code tags. Use the [code] icon above the input box. | |
Re: [QUOTE]how did it have the output 0,1,4,11,26;[/QUOTE] Did you take out the print statement? The code you posted doesn't output anything. Have you written a small program and put that code in it and executed it? To see what the code does add a println statement just after the for … | |
Re: Cross posted at [url]http://www.codeguru.com/forum/showthread.php?p=2030495#post2030495[/url] |
The End.