2,777 Posted Topics
Re: What you show for the print out looks like what an object returns to the toStrng() method if it is not overridden in the class. IE it uses the default Object toString() What package is the Date class in? | |
Re: What is the correct sum of primes? What is the difference between what you compute and the correct answer? | |
Re: Perhaps you'd get better answers on an HTML or javascript forum | |
Re: What info do you need to get from the user and what data do you want to display back after having done some computations? ![]() | |
![]() | Re: [QUOTE]when I try to create the file in my server space, it seems corrupted[/QUOTE] Have you compared the input file to the output file (byte by byte) to see exactly what the differences are? Where do you read/handle binary/non-text data? Your posted code appears to only handle text. ![]() |
Re: Where is the code you are having problems with? Do you have a design for how the program is to work? | |
Re: You've posted a lot of code to go thru. If you're just starting with GUI, perhaps it'd be better if you started with a small simple GUI, get that to work and then expand it towards what you need. My approach to using GUI is to present the GUI, let … | |
Re: You don't have to set the classpath to the JDK folders. The java command knows where they are. Are you setting the variables in a batch file or in the whole system? Open a commmand prompt and enter: SET Copy and paste the full contents here so we can see … | |
Re: [QUOTE]What comes out in "finalyStore" is not the same as "original".[/QUOTE] Please print the contents of both arrays and post to show us. See the Arrays toString() method for easy display. | |
Re: The two of run methods appear to be overloads. They have different parameter lists. I don't know why the author reused the name because run() has a special usage in many classes. Otherwise run is just another method name. You need to read the API doc for each class to … | |
Re: Good luck on your exam. If you have any specific programming problems, post the code with your questions. | |
Re: [QUOTE]I don't know how to place them a descending order using loops.[/QUOTE] You probably need to look at writing a simple bubble sort. Google this to see how it works. Do you know how to extract all the letters of a String and put them into an array where they … | |
Re: I had this bookmark for it: [url]http://java.sun.com/docs/books/jls/third_edition/html/j3TOC.html[/url] But I see when I try to follow any links that most pages are missing | |
Re: Look at the for loop. The index's max value must be 1 less than the number of elements in the array. For example with 40 elements the max index is 39. Remember its 0 based. | |
Re: Are there any error messages in the browser's java console? BTW The APPLET tag's code= attribute refers to a class not a file. Try removing the .class | |
Re: Can you make a small simple program that compiles and executes with client and server parts to demonstrate the problem? | |
Re: What are you willing to pay for it? When do you need it? | |
Re: [QUOTE]RestrictedAccessException: Group: only a BranchGroup node may be added[/QUOTE] Have you read the API doc for the method you are trying to use? group.addChild(tg); And for the Exception you are getting? The message seems pretty specific. | |
![]() | Re: Where are all the parts of your application(applets, html, server) and how do they communicate? An applet can connect to the server it was loaded from. Are you trying to connect with another server from your applet? What code do you have on the server to control the chat sessions? ![]() |
Re: What is the name of the class you are trying to execute? Your posted code has: class ReverseWord { Your java command: java MyClass Where is the MyClass class file? Does it have the correct main() method? | |
Re: [QUOTE]when ever i used it an exception occur[/QUOTE] Please copy and paste here the FULL text of any error messages. | |
Re: Add a MORE statement at the end of the bat file to hold the console open to see if there are any more error message. Also try it with the java command vs javaw | |
![]() | Re: Is this product supported by anyone or have a forum for questions? [QUOTE]I might be reading the browser request in a wrong way[/QUOTE] Add a println to the code to show what is read into the line variable. ![]() |
Re: [QUOTE] it doesn't work [/QUOTE] Are there errors? Please copy and paste the full text of the error message here. Is the output wrong? Please show the current output, explain why it is wrong and show what you want the output to be. Don't expect anyone to download and read … | |
Re: Are you really interested in looking at the pixels of an image one by one and then trying to determine if there is a recognizable shape there? Take a piece of graph paper, draw a shape and go thru it starting at 0,0 to the ending x,y. Record when there … | |
Re: Read about the break statement and statement labels. Because it is a form of GOTO, a lot of people frown on its use. | |
Re: [QUOTE]the eclipse compiler gives me the following message:[/QUOTE] Strange, looks like an execution error. But I don't know your IDE so maybe it is compiler. [QUOTE]java.lang.NoClassDefFoundError: [B]org/slf4j/LoggerFactory[/B][/QUOTE] Where is the class that is referred to in this error message? | |
Re: [QUOTE]the value(s) are being returned as such - [B][Ljava.lang.String;@6f579a30[/B][/QUOTE] Where do you see the BOLD part shown above? It looks like you are printing the array. I think you want the contents of the array. Try this: [CODE] String[] anArray = new String[] {"asdf", "awer"}; // define 2 dim array … | |
Re: Not sure what you are asking. Are you making copies of the objects the pointers in the ArrayList point to? Or are there only one set of objects with differents sets of pointers to them. The contents of the different arraylists all point to the same objects. Changing them via … | |
Re: The main method that the Java command looks for has some args: String[] you left it off your main() definition. | |
Re: This is a very general question. You'd be better using Google to get some code that you could work on. You probably want to break the project up into several small parts, master the techniques for each and then merge them into the larger program. If you have specific questions … | |
Re: You could use a flag/boolean to remember if you are going up or are going down. ![]() | |
Re: Can you add some comments to the code explaining its logic. What is the user supposed to enter in the textfield? When I enter: 4+2= and press Enter, "4+2=" is copied to a label below the text field. How is the user supposed to enter his expression? | |
Re: TOOOOOO much code to go thru. Can you make a small program that demonstrates the problem you are having and that executes so we can compile and execute it to see the problem and help you find a fix. | |
Re: [QUOTE] have the rates.txt file in the correct directory[/QUOTE] Are you sure? Your IDE is fussy about where it wants files put. What happens if you take the program outside the IDE and execute it? For resolving this problem, get rid of 95% of this code and work with a … | |
Re: Try moving the I/O code out of the listener to its own thread. There may be a problem doing too much on Swing's EDT thread. Why don't you add a try{} catch block around the code that throws the exception? You should use an ArrayList to hold the lines, not … | |
Re: [QUOTE]string, which contains no more than 6 characters, and one digit.[/QUOTE] How would you do this manually? Do it in simple steps. As simple as possible. For example, in a loop you would: Get the next character then do some tests and count Look at the Character class for useful … | |
Re: [QUOTE] it doesent execute the line above the try-catch block[/QUOTE] Why do you think the code is NOT executing that line. What happens if you put printlns both before and after the line? You need to read about the Swing EDT thread. If your code is called on that thread … | |
Re: If you wrote your own code you would need to listen to mouse movement and detect a hover. When detected, get the component under the mouse and display a window. Isn't there a tooltip class to do this? | |
Re: What would the String contain? The pixel RGB values as decimal numbers separated by commas? Seems like a very strange conversion. Like a debug output for looking at the structure of an image. | |
Re: [QUOTE]the program is not responding[/QUOTE] Look at the while loop coding. Check the ending ; What do you want to happen with the loop you have coded? I don't see any comments in the code describing what it is supposed to do. So I can only assume that it is … | |
Re: [QUOTE]to be in one event [/QUOTE] What do you mean by "one event"? Your terms are unusual. | |
Re: Research method overloading. Basically it allows a coder to use the same method name for different but very related cases. | |
Re: I start by going to the API doc and read how each of those methods are used. Find the methods by using the INDEX link at the top of the API doc page. Come back if you have any questions. | |
Re: Another way to check a single char. Make it a String and use indexOf with a long String containing all the valid characters. | |
Re: Your code gets this error: Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException at BouncingBall$1.actionPerformed(BouncingBall.java:41) at javax.swing.Timer.fireActionPerformed(Unknown Source) The variable at line 41 is null???? ![]() | |
Re: You need a way to change/map your city detail x,y locations as you zoom or position the screen. Perhaps you can find an algorithm by taking paper and pencil and drawing a rectangle for the original view. Find an x,y on that and then zoom in by drawing a new … | |
Re: [QUOTE]the problem is in the return statement it doesnt receive the afectation of vic inside the for statement![/QUOTE] What is the value of vic that it is not receiving? How do you know what the value of vic is when it is being returned by the method? Is the code … | |
Re: [QUOTE]is says at the end No such element exception [/QUOTE] Please copy and paste here the FULL text of the error message. It has more information about the error than you show. Check your data to be sure there are enough tokens for each nextToken() to get one. |
The End.