2,777 Posted Topics
Re: I've never tried it. What happens when the Monitor class does a System.exit() after starting a process? Is the process ended also? | |
Re: Please open the browser's Java console, copy the contents and paste it here. Remove the package statement or change the <APPLET code= to include the package name and move the html to the folder with the drawboard folder in it. Ie up one level. The applet code doesn't have any … | |
Re: Could you define what you mean by 'table'? That's sort of a generic word. | |
Re: If something needed is missing, I guess you need to find the missing part. | |
Re: Depends what values you want and for what usage. | |
Re: I read the API doc for writing PDF files to see what the options are. Not part of standard java. | |
Re: [QUOTE]StackOverflowError[/QUOTE] Those usually occur when there are recursive calls in the program. Is knap() calling knap() too many times? Put in a counter and use println() to show what is happening. | |
Re: Please post links to other forums you've asked this on | |
Re: Accumulate the text inserting newlines or use an append() method to add to the end. | |
Re: Please use the code tags when posting code [QUOTE]bufRead.readLine().equals(t.toString()[/QUOTE] Try debugging your code by Displaying the value of every line you read and the value of the String t. | |
Re: First write a program to read an integer from the user. Then add a loop to print out '*'s from 1 a line to the number per line. See println() and print() for doing the output. Type in your code, compile it and execute it. Come back if you need … | |
![]() | Re: One way is to add a method in the class with the data that will return the data. Then pass a reference to that class to the class that needs the data where it can be called. In the class with the textfield: tf public String getData() [ return tf.getText(); … ![]() |
![]() | Re: Is there a layout manager active for thePanel? Are you fighting it? |
Re: Another approach is to use the full path to the command when using it so the OS doesn't need to look on the PATH for it. On some OSes you could write a script or batchfile that has the full path in it. | |
Re: [QUOTE]able to add words to a pane that are different sizes and fonts.[/QUOTE] Look at the JTextPane class. [QUOTE]requirement of being able to look back at previous lines and fetch the text without formatting[/QUOTE] What are you going to do with the fetched text? Hold/process it as a String? | |
Re: Can you post the full text of the error message? The error message should have the source code line number in it. You've left that off when you entered the error message. Also use code tags when posting code to keep its formatting. | |
Re: The constructor must have the SAME name as the class. Line 8 has a different name. Lines 3 & 8 have the same names in second code. | |
Re: Please copy and paste the full text of the error message. There could be important info there. Is the class in a package? | |
Re: For questions that ask: "What will happen if ..." I recommend you write a program, execute it, look at the output and see happened. | |
Re: [QUOTE]is txt actually a new JTextField() if the name is changed[/QUOTE] No. The name belongs to the Component class a parent of the textfield class. The textfield object is the same object created with the new statement. [QUOTE]Is it possible to get unique txt.getText(); from txt fields if the txt.setName() … | |
Re: [QUOTE]Cannot make a static reference to the non-static field[/QUOTE] Looks like you are trying to reference variables from the static main() method that only exist when an object is created. The variables do NOT exist until you do a new GradeBook(). Once there is an object, you'll need to use … | |
Re: if((fptree_id[b].equals(item)) && (fptree_pid[b].equals(temp_pid))){ I assume your error happens here. Check your logic to see what that the value of b is valid. Use some println() to show the value of b and the value of any other variable that could effect how the loop works. The for loop allows b … | |
Re: Creating an array only creates the array object. There are no Animal objects in it yet. You need to fill the array with Animal objects, element by element. | |
Re: Hard to help you without any code to look at and questions about the code. What is/are your questions? | |
Re: What is the program supposed to do? There is a lot of code with no comments explaining why your are doing things. Add comments to describe what each section of code does. Where is the printing of valueq1? Why do you think the output from your program is wrong? What … | |
Re: [QUOTE]My program will not start once I try to execute the Jar file[/QUOTE] What error messages do you get? Copy and post them here. How are you executing the program outside of the IDE? Open a command prompt and execute it there so you'll see any error messages: java -jar … | |
Re: What does the audio object's class's API doc say about that error message? Is this a compile time or execution time error? Your a little short on explaining what your doing. | |
| |
Re: [QUOTE][url]http://ipaddress/HelloWorld/src/HelloWorld.java?type=1[/url][/QUOTE] This url looks like it points to a java source program. I would expect that the server would read the source file and return it to your browser. If you want to execute your servlet, you need the URL that points to that servlet. | |
Re: There is nothing in Random that says that it can not return 2 equal values back to back if the range of numbers it's returning is so small. If you want 2 sequential numbers to be different, save it, compare against the last and get another one until its different. | |
Re: [QUOTE]I have no idea how the program will deal with the path (C:\\My Documents) to the document on the other computer.[/QUOTE] The "magic" that makes the internet work is servers. To communicate with another computer, that other computer needs some software running to receive your messages. That software is called … | |
Re: That's strange. Line 52 in the error message is blank in the code you posted. What does the method slots.get(i) return? Is it an object with a method: inputData()? Break up the compound statement into separate parts and println() the results of each part. Compound statement has more than one … | |
Re: [QUOTE]check whether a solution exists[/QUOTE] Could you define what a solution is? How are the numbers to be partitioned? Sounds like you need an algorithm for solving the problem? What do you have so far? | |
Re: [QUOTE] I need to make it be able to find multiple modes[/QUOTE] Can you explain what that means? One way to count occurrences is to use a hashtable with the key = an occurence and the value = the count. | |
Re: [QUOTE]it doesn't work[/QUOTE] please explain and show error messages or describe what's not working. | |
Re: Could you show us the brute-force method you use to solve this? | |
Re: When you get errors, please copy and paste the full text of the error message here. Don't edit the error messages. | |
Re: I don't know that sm1 is around today. Are you sure he/she is on this forum? | |
Re: An applet can write to the browser's Java console. That's useful for debugging. There is no way for an applet to read from the console. You're going to have to learn a little GUI to get input from a user. | |
Re: [QUOTE] it refuses to open[/QUOTE] Do you get any error messages? Please copy and paste full text here. Does your jar file have a correctly formatted Manifest file? | |
Re: [QUOTE]it goes kablooie[/QUOTE] What does that mean? Please show the full text of any error messages. [QUOTE]FileOutputStream("http://mitch9654.zymichost.com/songs.DAT");" [/QUOTE] How can a URL with an http: protocol be a local file? The API doc for FileOutputStream(String) says: [QUOTE] Creates an output file stream to write to the file with the specified … | |
Re: [QUOTE]calculate the min and max depth and average look up[/QUOTE] What does this mean? Can you Explain what happens that has a depth? And what a lookup is? | |
Re: Can you define what a cluster is? Do the points enclose a shape such that a line connecting the outer most points forms a boundary for a region? | |
Re: This is an OS issue, nothing to do with java programming. On Windows the filetypes are associated with commands by entry in the registry. The easy user interface to add your own filetype is through Windows Explorer (98 & XP) Use menu item: Tools|Folder Options|File Types. Click New and fill … | |
Re: [QUOTE]hold my right click and drag the mouase you see the box [/QUOTE] Is the "box" you see part of your program? Can you describe what you see? Can you take a ScreenPrint and save the image and post it here? | |
Re: [QUOTE] want to create a manifest file[/QUOTE] What program uses the manifest file? Does the program have doc that define what needs to be in the file? | |
Re: Do you get any error messages in the browser's Java console? Please copy and paste them here. |
The End.