2,777 Posted Topics
Re: [CODE] //c.add(mobileOrdersInputLabel); //c.add(floralOrdersInputLabel); [/CODE] What happens when you uncomment these? You need to look into how to use layout managers. | |
Re: If[B] parsing[/B] the text file each time is a problem, then can you create your own formatted file that does NOT require parsing but can be read and used to create the objects needed. What are you trying to optimize? | |
Re: The trick is to initialize the variables that are to receive the lowest number with the highest possible number ie any number will be smaller than its first value. For the highest value initialize the save variable with the lowest possible number so that any number will be higher. Add … | |
Re: [QUOTE]a single digit from an int[/QUOTE] It depends on the number's base. You use the modulus and divide operators to get at the "digits" of the int number. For base 10 use % 10 and / 10 Remember all data is stored in the computer in binary. We humans like … | |
Re: Is there a way to do this in HTML? Copy that method/technique to your code. | |
Re: What happens if you write a program and execute it? | |
Re: [QUOTE]it wont allow me to[/QUOTE] What does this comment mean? | |
Re: Why do you want to convert a boolean to an int. It makes no sense. A boolean has 2 values, an int has billions. Why would one of the billion values be true and another be false? 0 and NOT 0 are C concepts. Nothing in java corresponds. | |
Re: [QUOTE]what happens if[/QUOTE] Sounds like an easy program to write and test what happens. And probably faster than waiting for someone to come along. Could you write a program to test this and report back the results? | |
Re: Sounds like a logic problem. Add some println() statements to show the values used to position the paddle every where they are used and where they are changed. Looking at the output should help you find your problem. | |
Re: Look at the API doc to see if it is possible to set the hidden attribute for a file. | |
Re: Why the "urgently needed" in the title? | |
Re: Can you post the console output for when you execute the code that shows the printouts? [CODE]if(record2%2!=0)[/CODE] What is the purpose of that statement? There is a lot of undocumented/unexplained logic in the actionPerformed method. Can you explain what all that is about? There are many variables and tests that … | |
Re: [QUOTE]why is it that I dont get any output shown[/QUOTE] Can you show your output? [CODE] String a = new String("fileName"); if (a.matches("^[ATOM][.]$[^H]")) [/CODE] What do these two statements do? | |
Re: Another point of view: Scope is a compile time concept. Stack is a runtime concept. | |
Re: Why start a new thread? [URL="http://www.daniweb.com/forums/post1267559.html#post1267559"]http://www.daniweb.com/forums/post1267559.html#post1267559[/URL] | |
Re: First read the API doc on applets and the Tutorial about Applets Start with a class that extends JApplet. Move the code in main() to an init() method. | |
Re: @moutanna How does uncommented code explain how to design and code a program to solve a problem? | |
Re: Try debugging the code by using println() to print out the value of the size variable when its changed and when its referenced. | |
Re: Do you have the algorithm for testing if its balanced? | |
Re: [QUOTE]Is it possible to return an array "directly",[/QUOTE] Have you tried it with the compiler? Do you get errors? | |
Re: [QUOTE] it does not give me the right answer...[/QUOTE] Please Show the input and output and explain | |
Re: I don't see any comments in the code showing where the sort is happening. Can you comment the code to show where the sort logic is? | |
Re: You'll need to get a package for reading Excel files, unless its a .csv which is really text and can be read by java. | |
Re: YOUR CODE DOES NOT COMPILE!!! Waste of time posting code with syntax errors!!! Have you tried debugging your code by add println() statements at different places to show when and where the code is executing and how variables values change? Also it'd be easier to test your code if you … | |
Re: A couple of suggestions: 1)Add a sample input to the code that allows for easy of testing: Add this first thing in main() method [code] if(args.length == 0) { args = new String[] {"-i", "3", "-t", "3", "-1", "3","-t", "3"}; } [/code] 2) add a final else clause to print … | |
Re: guess its time to ask the instructor what to do about your questions. | |
Re: [QUOTE]System.out.println(jPieces[x][y])[/QUOTE] Try debugging your code by changing the above to: System.out.println("x=" + x + ", y=" + y + " " + jPieces[x][y]) That should show you the problem. | |
Re: Is your OS multi tasking? Can the OS use time while your code is executing? [QUOTE]tm.getCurrentThreadUserTime()[/QUOTE] What class is the tm object? | |
Re: Please post links to other forums when you cross post a question. | |
Re: What part of the graphics area do you want to change and what part leave? | |
Re: Post a small working program to show what you are talking about. | |
Re: Depends on the JVM implementation. | |
Re: [QUOTE]I NEED a similar program[/QUOTE] Do you mean: I NEED [I]to write[/I] a similar program? Otherwise have you tried Google? | |
Re: Does your code set the location? | |
Re: Could you have a Window listener that uses setLocation to move it back. | |
Re: Use native code to react in real-time to user actions. | |
Re: [QUOTE]how to save it into .txt or .dat[/QUOTE] If you have 'it' in an editor like Notepad, you can use the File|Save menuitem to save it to a file. What is the 'it' you ask about? [QUOTE]how do i view it in another new frame that view the list in … | |
Re: Have you looked up the meaning of the error message? | |
Re: Can you look at what the server receives when you try to access it with that URL? What happens if you use that URL in a browser? I don't know if the URL class has the logic to do the steps needed to respond to a 401 response by generating … | |
Re: [QUOTE] get the bidder's name called[/QUOTE] What variable is the bidder's name in? I don't see it in the code you posted. Is it in the Person object reference by bidder? | |
Re: The doc for compareTo() says: "Compares two strings lexicographically." Can you show an example where the results are not case sensitive? | |
| |
Re: When I try to compile I get: Running: D:\Java\jdk1.6.0_02\bin\javac.exe -Xlint -g -deprecation -classpath D:\JavaDevelopment\;. PackageLoader.java PackageLoader.java:16: cannot find symbol symbol : class Logger location: class PackageLoader private static final Logger log = Logger.getLogger( PackageLoader.class ); ^ PackageLoader.java:22: cannot find symbol symbol : class Filter location: class PackageLoader public <T> Class<T>[] … | |
Re: [QUOTE]how to listen before any client connects [/QUOTE] Use the ServerSocket class. | |
Re: [QUOTE]i need delete all the files dynamically[/QUOTE] Sounds like you need to get the names of all the files in the directory and delete them one by one. Read the comments in the above code. | |
Re: [QUOTE]Does class B also implement interface B_int?[/QUOTE] What does the compiler say? Code a test and compile it and let us know the results. | |
Re: Do you have the algorithm that you want to write in Java? Once you get that, someone can help you with your problems coding it. |
The End.