2,777 Posted Topics

Member Avatar for subrat_p

Applets normally run in a browser and require their support to execute. If you want to create an instance of an applet and have it execute, you will have to provide all the support that a browser does. You probably don't want to do that. You should redesign your program, …

Member Avatar for JamesCherrill
0
475
Member Avatar for Kremlin
Member Avatar for gedas
Member Avatar for JamesCherrill
0
87
Member Avatar for Johannady2

Applets are not allowed to use System.exit(0). The browser is in control. Use showDocument() if you want a different page shown or remove all the components that are being shown.

Member Avatar for Johannady2
0
255
Member Avatar for Johannady2

Read the API doc for theFont class. It tells you how to have more than one style in a font by Oring the styles used in the constructor..

Member Avatar for NormR1
0
2K
Member Avatar for Johannady2

Please explian what "won't work" means. > the Radio Buttons for colos work.. why won't the Checkboxes work? Where does the code set the font used to draw the String?

Member Avatar for Johannady2
0
197
Member Avatar for lilym

Check the doc for regular expressions to see if any of those characters are special and need to be escaped. For example if & is special: "|\\\\&|"

Member Avatar for NormR1
0
56
Member Avatar for MoMule
Member Avatar for SuperManofBC

Take a look at the tutorial: http://docs.oracle.com/javase/tutorial/java/nutsandbolts/if.html

Member Avatar for SuperManofBC
0
210
Member Avatar for mehnihma

If the object being read is a String, cast it to String. Why do you think the object being read is a Vector?

Member Avatar for mehnihma
0
533
Member Avatar for ocw91
Member Avatar for NormR1
0
72
Member Avatar for natri1991
Member Avatar for TIM_M_91

What are the rules for what is printed on each line? The simplest way: System.out.println("xxx\nxoo\nxoo");

Member Avatar for wen_cai
0
104
Member Avatar for koolhawk

> how can i figure out which component that piece is in One way is to extend the component and add methods and class variables that can be used when the component is clicked on.

Member Avatar for NormR1
0
214
Member Avatar for yuyuttiu

Why is the sleep() call? After commenting that out I get a window with the cyan color and two shapes, one all red on right and one with red and yellow on the left. What is the code supposed to do?

Member Avatar for yuyuttiu
0
652
Member Avatar for vinnitro

The code needs to continue after printing line 6 to print the rest of the lines. What are the rules for formatting the rest of the lines after the full length line? It could be the reverse of the lines printed before the full length line. Use a piece of …

Member Avatar for vinnitro
0
160
Member Avatar for GeekTool

Can you post what you have found and your questions about what you don't understand? The logical operator returns a true/false value like == or < bitwise changes the value of a variable like a + or * operator

Member Avatar for NormR1
0
561
Member Avatar for CPT
Member Avatar for GeekTool

Try debugging the code by adding println statements to print out the values of the variables as they are changed and to show the execution flow. Put a println in each method.

Member Avatar for wen_cai
0
233
Member Avatar for GeekTool
Member Avatar for GeekTool

> Exception in thread "main" java.lang.IllegalArgumentException: input == null! > at javax.imageio.ImageIO.read(ImageIO.java:1348) > at newsatranc.NewSatranc.PaintPiece(NewSatranc.java:200) At line 200 the code called the ImageIO read() method with a null value. Find the variable on line 200 and backtrack in the code to see why it does not have a valid non-null …

Member Avatar for NormR1
0
261
Member Avatar for jefferson33333

Are you trying to learn how to design and write java programs Or do you want some one to write a program for you?

Member Avatar for jefferson33333
0
392
Member Avatar for AP07KJT

Please post the full text of the compiler's error message. It includes the source line where the error is. Here is a sample: TestSorts.java:138: cannot find symbol symbol : variable var location: class TestSorts var = 2; ^

Member Avatar for JamesCherrill
0
3K
Member Avatar for c.pentasuglia

How are the interfaces related to the desire of the second class wanting to get something from the first class? When a class implements an interface, it is required to define all the methods in the interface. An interface gives another datatype to the class that implements it. That is …

Member Avatar for NormR1
0
210
Member Avatar for jwings

Try using the path in a File object and print out the FIle object's absolute path to see where the app is looking for the file.

Member Avatar for NormR1
0
257
Member Avatar for shifat96

The three variables you show are parameters to the bigWinner method. They only exist and have values when the method is called and is executing. They go away when the method exits. The caller of the bigWinner method has the values of the parameters that were passed to bigWinner(). Can …

Member Avatar for corby
0
5K
Member Avatar for crazymidget01

The OP's code does not use objects. Its only primitives. Why not overload the method vs having a new name for every type. See the Arrays class's toString() method.

Member Avatar for wen_cai
0
174
Member Avatar for javaa

> i had punsh of Exception Are you still getting errors? Please post the full text of the error messages.

Member Avatar for javaa
0
269
Member Avatar for NestaMarley
Member Avatar for andy_m

Print out the values of all the variables used to compute the value that is being printed just before the expression that does the computation. That should show you where the problem is.

Member Avatar for andy_m
0
140
Member Avatar for spydahmeen

Do you have questions about the assignment? Post them. Also post your code and the full text of the error messages.

Member Avatar for NormR1
0
109
Member Avatar for MasterHacker110

If you are using a commandline in a console window, you need to be in the correct directory relative to the .class file and use the java command with the classname. If the class is in a package it is more complicated. For a class not in a package, change …

Member Avatar for MasterHacker110
0
245
Member Avatar for MasterHacker110

What OS are you on? With Windows there are entries in the registry that define what command line to use to open a file. Why do you want to open a .class file? What program do you use to do that?

Member Avatar for MasterHacker110
0
134
Member Avatar for venkateshyeluri
Member Avatar for JamesCherrill
0
218
Member Avatar for TTTHXC

What is the contents of th String you are trying to parse? How is it getting non-numeric data? If you can't see what the value being parsed is, assign it to a String first and print the value of the String so you can see it. Does the full text …

Member Avatar for JamesCherrill
0
263
Member Avatar for peck3277

If the variables are defined as class variables, all methods in the class should be able to access them.

Member Avatar for Zaad
0
145
Member Avatar for jade_91

The only variable in a ListNode is a int. If you want it to contain a String also, you will need to add another variable to the ListNode class that is type String. Another way might be to use inheritance. Define a base class with the next node and extend …

Member Avatar for Zaad
0
428
Member Avatar for GTech4life

You forgot to post the code you need help with. Don't forget to explain what your problems are.

Member Avatar for NormR1
0
315
Member Avatar for GeekTool

What does "not accept" mean? Do you get error messages? If so, please post them. The numbers as you have written them are int values. There are suffixes you can put on a number to make it a double or long.

Member Avatar for sabbib
0
154
Member Avatar for crazymidget01
Member Avatar for hous3aholik
Member Avatar for JamesCherrill
0
747
Member Avatar for uetgate

Where in your code are you having problems? Did you miss the class where your teacher defined what a token is? A sort of generic definition would be some characters that are separated from other characters by some delimiter, For example if ; is the delimiter: "xx;ttttt;uuu" would have three …

Member Avatar for NormR1
0
114
Member Avatar for bo0ga

A simple way would be to read the input stream until the starting tag is found and then save what is read until the ending tag is found.

Member Avatar for NormR1
0
209
Member Avatar for crash bash
Member Avatar for hg_fs2002

If you have a reference to a Node class object you can use that reference to access the public members of the Node class. There are several versions of the sort() method. Use the one that takes a Comparator that you provide.

Member Avatar for corby
0
131
Member Avatar for programing

Please edit the code and add proper indentations. All the statements should not start in column 1. What is wrong with what the program does now?

Member Avatar for NormR1
0
790
Member Avatar for jaysb

Where are you having problems writing a java program? Explain what you want to do in java.

Member Avatar for TrustyTony
0
4K
Member Avatar for GeekTool

> java.util.IllegalFormatConversionException: d != java.lang.Double On line 24, you need to use the correct data type or format code in the printf statement. The format code and the data type don't match. Read the API doc for the Formatter class to see what the choices are.

Member Avatar for NormR1
0
264
Member Avatar for reitzscape

Remove the last changes you made to the code and restore it to the condition it was when you had no compiler errors. Then try again to add a few lines at a time and compile frequently.. What changes did you make to the code that caused this error?

Member Avatar for NormR1
0
345
Member Avatar for programing

How is the program executed for testing? I don't see a main() method.

Member Avatar for NormR1
0
580

The End.