2,777 Posted Topics

Member Avatar for acash229

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]

Member Avatar for NormR1
0
127
Member Avatar for joblanigan

[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 …

Member Avatar for coil
0
363
Member Avatar for Premsathishbe

You provide a good service as a front end for google. They should pay you.

Member Avatar for NormR1
0
84
Member Avatar for nix_xin

[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 …

Member Avatar for NormR1
0
179
Member Avatar for blknmld69

[QUOTE]I am receiveing cannot find symbol errors[/QUOTE] When you get errors, please copy the full text and paste them here.

Member Avatar for NormR1
0
262
Member Avatar for TahoeSands

[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 …

Member Avatar for TahoeSands
0
170
Member Avatar for robertmacedonia
Member Avatar for PDB1982

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]

Member Avatar for tux4life
0
98
Member Avatar for hehe31

What problem(s) are you having? Please post your code and the full text of the errors you are getting.

Member Avatar for hehe31
0
147
Member Avatar for NewOrder

Please copy and paste here the full text of the error message if you need help understanding what it says.

Member Avatar for NewOrder
0
265
Member Avatar for LianaN

[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

Member Avatar for NormR1
0
634
Member Avatar for titan5

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 …

Member Avatar for NormR1
0
166
Member Avatar for kch1973

[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 …

Member Avatar for kch1973
0
144
Member Avatar for glenak

You can use the Process class to execute OS commands like Notepad. For code examples use Search here or Google.

Member Avatar for glenak
0
137
Member Avatar for TahoeSands
Member Avatar for titan5

[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?

Member Avatar for titan5
0
147
Member Avatar for extemer

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 …

Member Avatar for NormR1
0
106
Member Avatar for TheWhite
Member Avatar for tallygal

[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.

Member Avatar for coil
0
162
Member Avatar for TahoeSands

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. …

Member Avatar for NormR1
0
423
Member Avatar for arntb0rnprgrmr

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 …

Member Avatar for VernonDozier
0
200
Member Avatar for subrat_p

[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 …

Member Avatar for Ezzaral
0
175
Member Avatar for hoppy9

Can you describe what your problems are? If you are getting errors, please copy the full text and paste here.

Member Avatar for NormR1
0
499
Member Avatar for robertmacedonia

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.

Member Avatar for robertmacedonia
0
2K
Member Avatar for seanooi

[CODE]aLine = infile.readLine(); System.out.println(aLine); // Print the last line read, including the null at EOF [/CODE]

Member Avatar for javaAddict
0
223
Member Avatar for smoothe19

Ok, you've posted your assignment. Now please ask your questions about where you are having problems.

Member Avatar for javaAddict
-3
343
Member Avatar for chris12047

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 …

Member Avatar for NormR1
0
206
Member Avatar for NormR1

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 …

0
653
Member Avatar for NewAndClueless

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 …

Member Avatar for NormR1
0
215
Member Avatar for miraj0072004
Member Avatar for sushant5252
Member Avatar for NewOrder

[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.

Member Avatar for NormR1
0
232
Member Avatar for cac186

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.

Member Avatar for NormR1
0
381
Member Avatar for BestJewSinceJC

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?

Member Avatar for masijade
0
142
Member Avatar for DARK_BYTE

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.

Member Avatar for Jaishu
0
1K
Member Avatar for TheSecOrg

Are you looking for a destination? How about Florida? Is this an IDE question?

Member Avatar for TheSecOrg
0
252
Member Avatar for miraj0072004

[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?

Member Avatar for NormR1
-1
133
Member Avatar for robertmacedonia

Write the data to a file or a bunch of files in one or more directories. Depends on update and retrieval requirements.

Member Avatar for JamesCherrill
0
120
Member Avatar for comandor
Member Avatar for TahoeSands

[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 …

Member Avatar for Ezzaral
0
125
Member Avatar for miraj0072004

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?

Member Avatar for NormR1
0
448
Member Avatar for hazeeel

[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?

Member Avatar for hazeeel
0
259
Member Avatar for gopi17

[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 …

Member Avatar for NormR1
0
11K
Member Avatar for samuel17

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

Member Avatar for samuel17
0
186
Member Avatar for gopi17

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

Member Avatar for NormR1
-1
214
Member Avatar for churva_churva

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

Member Avatar for Akill10
0
165
Member Avatar for mhopper

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?

Member Avatar for NormR1
0
159
Member Avatar for churva_churva

churva_churva What are you trying to do here? Learn java programming or have your homework done for you?

Member Avatar for peter_budo
0
221
Member Avatar for churva_churva

[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.

Member Avatar for jon.kiparsky
0
493
Member Avatar for Pushpasheela

Can you post some code that compiles and executes that shows what you want to do?

Member Avatar for Akill10
0
80

The End.