2,777 Posted Topics
Re: Cross posted at [URL="http://www.java-forums.org/new-java/32480-circleshapes-java.html#post143539"]http://www.java-forums.org/new-java/32480-circleshapes-java.html#post143539[/URL] | |
Re: [QUOTE]i'm having difficulty with at the moment is creating a field that will remember the current shape the user has chosen[/QUOTE] To remember a value, you need a variable in your class to contain the value for future reference. What type of data is the current shape held in? Is … ![]() | |
Re: You provide a good service as a front end for google. They should pay you. | |
Re: [QUOTE] i don't know how to use math class[/QUOTE] Write a simple program that calls the various methods of the Math class and prints out the results to see what they do. When debugging your code, break up the long expressions into single simple expressions and print out the intermediate … | |
Re: [QUOTE]I am receiveing cannot find symbol errors[/QUOTE] When you get errors, please copy the full text and paste them here. | |
Re: [QUOTE]I get a Static Error when I try to run the code[/QUOTE] By run the code, you mean execute it? Your code compiles ok? Can you open a command prompt window and execute the program and copy the screen and paste it here. If you are on windows here are … | |
Re: Did you mix an old version with the newer one? | |
Re: Strange that it wouldn't print a 0.0? Try adding a $%.2f\n to format the data. [icode]System.out.printf("Total of Purchase is:$%.2f\n"", account1.getTotal();[/icode] | |
Re: What problem(s) are you having? Please post your code and the full text of the errors you are getting. | |
Re: Please copy and paste here the full text of the error message if you need help understanding what it says. | |
Re: [QUOTE]ava.lang.ClassCastException: [Ljava.lang.Object; cannot be cast to [[Ljava.lang.Object;[/QUOTE] The problem pointed out here is an object of one dim is being used where a two dim is required. Or visa versa. The [ and [[ in the message indicate one and two dimensions. Look at the FilterClass line 60 | |
Re: Comment on your variable name: V Coding conventions for variables say they start with a lowercase letter. Single letter names are not selfdocumenting as far as what the variable is used for. Use a name what when read shows what the variable contains or what it is used for. The … | |
Re: [QUOTE]I am missing information on one object from Supplier, and on one object from Printer.[/QUOTE] Can you show us the output where that info is missing (add comments like <<< XXX missing here and show us what you want the output to look like? What are the variable names for … | |
Re: You can use the Process class to execute OS commands like Notepad. For code examples use Search here or Google. | |
Re: I don't know any java code dealing with window handles. | |
Re: [QUOTE]but couldnt figure out how to correct it[/QUOTE] Does that mean you got erors compiling or executing the code? Or does it mean that the value of d1 was incorrect? | |
Re: One way to understand a simple loop like you show is to play computer with it. Manually step thru the code and compute variables as they change and write down output as it is printed. Another way is to add some debugging print statements to show how the values change … | |
Re: Can you get to the connection and close it? | |
Re: [QUOTE]conversion that is not calculating the cm and mm right.[/QUOTE] please show us the program's output and explain what the problem is with it and show what you want the program to output. ![]() | |
Re: To answer the question: [QUOTE]Why @Override[/QUOTE]. It saves LOTS of time for a programmer trying to find a bug in his code when he has typo-ed an override and ended up with an entirely new method that the compiler is very happy to add to the others in the class. … | |
Re: I guess you would start by studying the Java Swing tutorial to see how to create GUI. Look at the different components and the layout managers. Then design the GUI and game interactions and start writing code. Post the code and your questions when you have problems. Be sure to … | |
Re: [QUOTE]It makes some error sound[/QUOTE] use the java command instead of javaw and you should get an error message on the screen. Copy and paste the message here if you have questions about it. To copy the contents of the command prompt window: Click on Icon in upper left corner … | |
Re: Can you describe what your problems are? If you are getting errors, please copy the full text and paste here. | |
Re: Written objects are not the same as text. I'm not sure you can append to a file containing an object. This will take further study. | |
Re: [CODE]aLine = infile.readLine(); System.out.println(aLine); // Print the last line read, including the null at EOF [/CODE] | |
Re: Ok, you've posted your assignment. Now please ask your questions about where you are having problems. | |
Re: What problems or errors do you have? Please use code tags (icon above and to right) when posting code. Comment on your code: [CODE]int totals[] = new int[ 48000 ]; // frequencies of the sums[/CODE] What is the max index you expect to get for this array? For debugging: you … | |
For those that want to directly execute a .class file in a command prompt window. Here is a way: Create the following batch file. Use the Windows Explorer Tools to add a commandline for the .class file: C:\BatchFiles\ExecClass.bat "%1" Give it a name like: Execute class file The batch file … | |
Re: Is this a java coding problem or a math logic problem? If you are having problems coding an algorithm in java, please post the algorithm and explain where your problem coding it is. I don't know where you can go to get any math help. An example would help: Show … | |
Re: Have you checked the error stream also? | |
Re: subString(0+6, 10) or subString(0+"<text>".length(), 10) | |
Re: [QUOTE]but it doesnt work!!![/QUOTE] Please show us what your code outputs and what is wrong with it. Also show what you want the output to look like. | |
Re: A suggestion: Beef up your debug output by IDing what is being printed. For example: System.out.println("shew=" + shew); That makes it a lot easier to find the last line printed than having to count down thru the lines of code to find where the problem was. | |
Re: Sort of like your telephone number. If you change it, how will your friends know the new number. Have a web site/page where you post the number that can be read by the software that needs to know your current port. What other software is taking the number? | |
Re: What does the client expect to receive when you send a video file? I wouldn't think sending a video file would be any different from sending any type of file. The server reads and sends the bytes of the file to the client. | |
Re: Are you looking for a destination? How about Florida? Is this an IDE question? | |
Re: [QUOTE]how to get the process output to a String[/QUOTE] There are methods to get I/O Streams for the process you are running. Have you tried reading what the process has written to a stream and writing to the stream that the process is reading from? | |
Re: Write the data to a file or a bunch of files in one or more directories. Depends on update and retrieval requirements. | |
Re: [QUOTE] I don't EVER want to click OUTSIDE the borders (or even ON the borders)[/QUOTE] Since you are generating the x,y locations, I don't understand why you can't restrict the click points to where-ever you want them. Please explain what the problem is. Your code doesn't check the points before … | |
Re: You can post an ActionEvent for the component. For example: [CODE] Toolkit.getDefaultToolkit().getSystemEventQueue().postEvent( new ActionEvent(src, // the component ActionEvent.ACTION_PERFORMED, "Enter")); [/CODE] What is the GUI interaction with a user? How do you detect that an Event should be sent to a component? | |
Re: [QUOTE]I wish to calculate it line by line.[/QUOTE] Can you explain this? Line by line implies a loop. What does this loop have to do with the existing loops? Can you do this part of the calculation in another part of the code away from the existing loops? | |
Re: [QUOTE]ow to link to another java class using a button [/QUOTE] Where in your code do you want to "link" to another class? For which button? I see 4 buttons What do you mean by "link to"? Call a method in the class, create a new instance of the class … | |
Re: Instead of hardcoding the integer literals: 12/100 define a double with the value 0.12 and use that in your computations. or make the literals doubles by adding .0 at the end: 12.0 | |
Re: This thread is the same as another:[URL="http://www.daniweb.com/forums/thread309524.html"]http://www.daniweb.com/forums/thread309524.html[/URL] Why start a new thread. Finish the old one | |
Re: Katana24 You are showing the OP some poor coding styles: You have an array and a method with the same name Both start with uppercase letters The name doesn't document what the method does: fillEmployeeNameTable | |
Re: I see the command lines are different. On linux you'e added a -jar option with a -classpath option. Not sure that works. On windows you give the starting class on the command line and no -jar option. What happens on linux if you use the commandline shown for windows? | |
Re: churva_churva What are you trying to do here? Learn java programming or have your homework done for you? | |
Re: [QUOTE]how to make a program [/QUOTE] Many people use an IDE when they make a program, however you can use any text editor to do it. | |
Re: Can you post some code that compiles and executes that shows what you want to do? |
The End.