2,777 Posted Topics
Re: 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, … | |
Re: Are there any error messages in the browser's java console? | |
Re: Is it as simple as doing a HTTP GET and getting the response? | |
Re: 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. | |
Re: 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.. | |
Re: 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? | |
Re: 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: "|\\\\&|" | |
Re: Could you make a small, complete program that compiles, executes and shows the problem? | |
Re: Take a look at the tutorial: http://docs.oracle.com/javase/tutorial/java/nutsandbolts/if.html | |
![]() | Re: If the object being read is a String, cast it to String. Why do you think the object being read is a Vector? ![]() |
Re: What layout manager are you using? What else is being added to the container? | |
Re: Please post your code here on the forum. | |
Re: What are the rules for what is printed on each line? The simplest way: System.out.println("xxx\nxoo\nxoo"); | |
Re: > 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. | |
Re: 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? | |
Re: 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 … | |
Re: 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 | |
Re: > if (socket.isClosed() Is that right? | |
Re: 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. | |
Re: > 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 … | |
Re: Are you trying to learn how to design and write java programs Or do you want some one to write a program for you? | |
Re: 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; ^ | |
Re: 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 … | |
Re: 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. | |
Re: 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 … | |
Re: 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. | |
Re: > i had punsh of Exception Are you still getting errors? Please post the full text of the error messages. | |
Re: Can you explain why you posted 850+ lines of code? | |
Re: 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. | |
Re: Do you have questions about the assignment? Post them. Also post your code and the full text of the error messages. | |
Re: 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 … | |
Re: 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? | |
Re: > convert the hashCode back into it's base string. Not sure that is possible. Its a many to one relationship. | |
Re: 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 … | |
Re: If the variables are defined as class variables, all methods in the class should be able to access them. | |
Re: 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 … | |
Re: You forgot to post the code you need help with. Don't forget to explain what your problems are. | |
Re: 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. | |
Re: Do you have any questions or problems? | |
Re: Strange card game with only two cards in the deck: true and false. | |
Re: 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 … | |
Re: 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. | |
Re: 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. | |
Re: 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? | |
Re: Where are you having problems writing a java program? Explain what you want to do in java. | |
Re: > 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. | |
Re: 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? | |
Re: How is the program executed for testing? I don't see a main() method. |
The End.