2,777 Posted Topics
Re: Do you have any specific problems or questions? | |
Re: Look at the PixelGrabber class for some code that works with images. What kind of things do you want to do to images? | |
Re: General comment on the last code posted: [CODE] } catch (InterruptedException ie) { } [/CODE] Always print something in a catch block to show the exception. Best is e.printStackTrace() | |
Re: Very hard without using one of the Java classes (ie the Java API). How is the data in the sentence represented in the program? String is part of the Java API An array of characters? | |
Re: Couple of things to clear up: Why do You have two JFrames, one extended and the other as a member in the class? Where you you add any components to the JFrame? What is the main1() method for? What does this statement do? AddPanel.add(AddPanel); | |
Re: [QUOTE]chars like so, 'playing', 'football'[/QUOTE] chars are primitives representing a single character. What you show is a String inside of single quotes which is not legal syntax in java. A char literal would be: 'p' or 'f' "playing" is a String | |
Re: The -cp option should have the path to all the classes that the JVM needs to execute your code. If some of them are in jar files, the path to the jar file should be in the -cp option. Also a reference to the start of the package path for … | |
Re: [QUOTE]I need help finishing this and the main[/QUOTE] Please ask questions about your problems. What errors do you get when you try to compile your program? Please copy and paste the full text here. A comment on the code shown: for (int i = 0; i < pet.length; i ++); … | |
Re: It would help us help you if you would post ALL of the error messages you get when you compile the program. The error messages contain lots of useful info about the errors. | |
Re: Please post the full text of the error message. | |
Re: Having a class implement an interface adds a 'type' to the class. Java uses typing to control the use of arguments as objects. Args must be of the correct type to be passed to a method. An interface also guarantees that the object being passed as an arg has the … | |
Re: [QUOTE]gives same access control exception[/QUOTE] Can you post the full text of the error message? | |
Re: Swing is the new GUI classes for java. Instead of prompting for input, present a window/form with input fields and some buttons. The user fills in the input fields and presses a button for some program action to process the data. You don't describe the function of the code you … | |
Re: [QUOTE]im getting an error a cannot find symbol error [/QUOTE] Please post the FULL text of the error message with all its information. A comment on your coding style: public class username Class names should have Uppercase first letters: public class Username When you're reading code and see a lowercase … | |
Re: Another approach would be to have the desired char as both uppercase and lowercase and compare each char in the String against both of them | |
Re: [QUOTE] this error message comes up[/QUOTE] You forgot to post the error message. Please post the full text of the error message. It has more info than your edited version. constructor for SimpleCanvas(int,int) Does the SimpleCanvas class have a constructor that takes two int args? | |
![]() | Re: Do you have a design for the program? The steps it must take to do the job. Posting the full text of the assignment shows a bit of laziness. Why post this: [QUOTE]Submit your zipped NetBeans project with all files, essay, and screenshots demonstrating your code runs.[/QUOTE] At least post … |
Re: Don't start a new thread every time you post. Continue one the first one. | |
Re: The only thing passed to the program from the command line is the array of String. main(String[] args) You can use one of the String class methods to get a char out of a String. | |
Re: Your are expecting the constructor of your class to return a value. If you look at the syntax for a constructor you see that it does not return any value. You need to create an instance of the class and call one of its methods that returns the value you … | |
Re: Can you explain how java programming fits into this? | |
Re: Good example of a potential problem with Autoboxing. i and j are objects but the compiler allows you to use them like primitives, EXCEPT for your example. BTW I don't care for compilers hiding things like this to save a few key strokes. | |
Re: Where are the constructors for the Camera class that match how you are trying to use it? new Camera("Sony", 10, 44, 200.0); What don't you understand about this error: [B]cannot find symbol[/B] The compile can NOT find a definition for the variable listed in the error messages. You need to … ![]() | |
Re: Also the Character class has a method for char to int: getNumericValue | |
Re: This is a continuation of the thread at: [URL="http://www.daniweb.com/forums/post1316142.html#post1316142"]http://www.daniweb.com/forums/post1316142.html#post1316142[/URL] | |
Re: Please copy and paste the full text of the error message. What does the API doc say is the type returned by the String charAt() method? Is it String? | |
Re: Have you done as coil suggested: [QUOTE]look at the API doc for JOptionPane's method: showConfirmDialog, you'll find that it returns an int value once a button is pressed.[/QUOTE] | |
Re: Please put your code in code tags. Use the icon to right above input field. ![]() | |
Re: The adding, deleting and updating would be the same in any program. The displaying to console would be by using System.out.print statements | |
Re: If you want to use java in a web browser, you will have to write an applet. | |
Re: You have too many files for anyone to work with easily. Can you make a small simple program that compiles and executes and demonstrates the problem and post that here? | |
Re: [QUOTE]System.out.println("Snake eyes occured: ");[/QUOTE] I'd recommend that you include a variable in the print out to show the value. Please use code tags (from icon at upper right) when posting your code to preserve formatting. Your code is pretty bare bones. There is no logic in it yet. Do you … | |
Re: What error messages are shown in the browser's java console? Your class is in a package and the applet tag's attribute: code= doesn't show that. If you add the package name then you will have to move the class file into that folder. If you want to have all the … | |
Re: It also helps in debugging code to have a main() that calls the code to test with a hardcoded value being passed to the code to be tested and that compares the results with a known correct answer. | |
Re: [QUOTE] however at the final stage I should get a true, but I'm getting a false.[/QUOTE] Can you explain where this happens and how it is shown? Add an se.printStackTrace(); to the catch block to show full text of the error message vs hiding it with your println() | |
| |
Re: Why write the html page lines to a file? Scan them as they are read from the site. | |
Re: Try a javascript forum. This is for java | |
Re: Reading the API doc for the nextInt method says it throws: NoSuchElementException - if input is exhausted | |
Re: Can you explain your problem? For example show the program's output and explain what's wrong and what you want it to be. | |
Re: The client's will have to identify themselves if you need to know who each one is. Otherwise, you can keep the communications with each client separate by using a thread for each client. As each client connects to the server, the server could assign them an id of an int … | |
Re: The line numbers in the error message don't match the posted code. Makes it hard to see where/what the error is. Try debugging your program by adding println()s to show the values as they are processed. What is the size of the array? Why is an index of 3 causing: … | |
Re: Do an interesting and useful project. Something that you'll enjoy doing and that will be something that others could want to use and that will stretch your knowledge and experience. | |
Re: Probably, but hard to describe without a lot more information on what the code is doing. | |
Re: [QUOTE]So is there any possible way where it can print out the actual no. of rows[/QUOTE] Do you want to see just the number of rows, not the contents of the rows? The length attribute of an array will give you its size(no. of rows). | |
Re: One method is the brute force method. Write some loops that go thru all the possible combinations of rolls and selects those that sum to the desired value. Think of the problem as numbers in sequence in base 6. Say there are 4 die. Then all the possible combos of … | |
Re: Are you designing a GUI with text fields and buttons? Can you describe the whole application in more detail? What code runs on the server? How does the applet communicate with the server? Is a new window: a new html page being sent to the browser from the server? | |
Re: [QUOTE]calls an internal jar [/QUOTE] What is an "internal jar"? [QUOTE]the internal jar is included in the main jar.[/QUOTE] You can not use a jar file that is inside another jar file this way. The JVM doesn't look inside jar files for other jar files. Given this path, [QUOTE]./jars/myJar.jar"[/QUOTE] Where … | |
Re: Also look at the MouseInfo class | |
Re: Is this the same question? [URL="http://www.daniweb.com/forums/thread306319.html"]http://www.daniweb.com/forums/thread306319.html[/URL] |
The End.