2,777 Posted Topics

Member Avatar for safee86
Member Avatar for aro_kai

Look at the PixelGrabber class for some code that works with images. What kind of things do you want to do to images?

Member Avatar for NormR1
0
136
Member Avatar for P00dle

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()

Member Avatar for P00dle
0
168
Member Avatar for ramjeev

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?

Member Avatar for jon.kiparsky
0
219
Member Avatar for djbhoco

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);

Member Avatar for jon.kiparsky
0
333
Member Avatar for nur_ahm4d

[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

Member Avatar for jon.kiparsky
0
242
Member Avatar for glenak

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 …

Member Avatar for NormR1
0
9K
Member Avatar for rowley4

[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 ++); …

Member Avatar for NormR1
0
2K
Member Avatar for BboyRodimus

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.

Member Avatar for NormR1
0
279
Member Avatar for Shaaani
Member Avatar for NewOrder

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 …

Member Avatar for NewOrder
0
119
Member Avatar for Shaaani

[QUOTE]gives same access control exception[/QUOTE] Can you post the full text of the error message?

Member Avatar for NormR1
0
124
Member Avatar for rayden150

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 …

Member Avatar for tong1
0
191
Member Avatar for neo_31591

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

Member Avatar for neo_31591
0
100
Member Avatar for Xufyan

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

Member Avatar for NormR1
0
137
Member Avatar for ausops

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

Member Avatar for NormR1
0
81
Member Avatar for KatWoman27

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 …

Member Avatar for NormR1
0
100
Member Avatar for churva_churva
Member Avatar for VernonDozier
-1
130
Member Avatar for Xufyan

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.

Member Avatar for HeidiC
0
452
Member Avatar for bibiki

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 …

Member Avatar for JamesCherrill
0
77
Member Avatar for wtf4096
Member Avatar for BestJewSinceJC

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.

Member Avatar for BestJewSinceJC
0
109
Member Avatar for fr0styh3rb

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 …

Member Avatar for coil
0
137
Member Avatar for plasticfood
Member Avatar for jon.kiparsky
0
150
Member Avatar for hazeeel

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]

Member Avatar for hazeeel
0
124
Member Avatar for plasticfood

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?

Member Avatar for NormR1
0
51
Member Avatar for oochi

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]

Member Avatar for NormR1
0
91
Member Avatar for fr0styh3rb

Please put your code in code tags. Use the icon to right above input field.

Member Avatar for coil
0
419
Member Avatar for churva_churva

The adding, deleting and updating would be the same in any program. The displaying to console would be by using System.out.print statements

Member Avatar for churva_churva
0
87
Member Avatar for b.bhagwan
Member Avatar for NormR1
0
123
Member Avatar for Simes

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?

Member Avatar for NormR1
0
181
Member Avatar for rebellion346

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

Member Avatar for rebellion346
0
494
Member Avatar for laughnan

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 …

Member Avatar for laughnan
0
417
Member Avatar for signum89

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.

Member Avatar for NormR1
0
225
Member Avatar for glenak

[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()

Member Avatar for glenak
0
144
Member Avatar for deep.bwn
Member Avatar for tn2130
Member Avatar for NormR1
0
285
Member Avatar for slamdunk
Member Avatar for BboyRodimus

Reading the API doc for the nextInt method says it throws: NoSuchElementException - if input is exhausted

Member Avatar for jon.kiparsky
0
111
Member Avatar for DeIntegro

Can you explain your problem? For example show the program's output and explain what's wrong and what you want it to be.

Member Avatar for DeIntegro
0
178
Member Avatar for glenak

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 …

Member Avatar for glenak
0
236
Member Avatar for hlonihloks

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

Member Avatar for NormR1
0
171
Member Avatar for monu952

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.

Member Avatar for monu952
-1
144
Member Avatar for KcNaveen

Probably, but hard to describe without a lot more information on what the code is doing.

Member Avatar for NormR1
0
64
Member Avatar for hazeeel

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

Member Avatar for NormR1
0
140
Member Avatar for titan5

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 …

Member Avatar for JamesCherrill
0
1K
Member Avatar for ubi_ct83

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?

Member Avatar for ubi_ct83
0
212
Member Avatar for sportinguista

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

Member Avatar for ~s.o.s~
0
153
Member Avatar for mansoor1000
Member Avatar for ubi_ct83

Is this the same question? [URL="http://www.daniweb.com/forums/thread306319.html"]http://www.daniweb.com/forums/thread306319.html[/URL]

Member Avatar for NormR1
-1
194

The End.