1,678 Posted Topics

Member Avatar for jaredleo999

[url]http://72.5.124.55/j2se/1.4.2/docs/api/java/awt/Container.html#removeAll%28%29[/url] is that helpful?

Member Avatar for BestJewSinceJC
0
4K
Member Avatar for bwall256
Member Avatar for diafol
1
160
Member Avatar for fozzywozzy

[QUOTE=moutanna;1204498]The paycheck is a function not a class; and the functions could not be instanciated. that mean we should not write some think like: [CODE] paycheck p1 = new paycheck(nameInput, hourInput, wageInpu [/CODE] this is wrong. the word "new" is used to create an instance of class and MUST not …

Member Avatar for fozzywozzy
0
93
Member Avatar for 05026652

I see no errors... you're ignoring the 'open' variable inherited from the Cupboard class, though.

Member Avatar for JamesCherrill
0
171
Member Avatar for campbellpatrick

Check out [URL="http://www.daniweb.com/forums/thread94021.html"]this daniweb thread[/URL] on scanf because if it is used improperly you can definitely have problems (such as overrunning the bounds of your char array) among other things. You also might want to see Dave Sinkula's snippet on [URL="http://www.daniweb.com/code/snippet216595.html"]reading an integer from the user[/URL] for a more thorough …

Member Avatar for BestJewSinceJC
1
183
Member Avatar for flyingcurry

You should set your initial lowest value to array[0], otherwise the lowest value variable will probably be initialized to 0, therefore, it will tell you the lowest value is 0 at the end.

Member Avatar for moutanna
0
97
Member Avatar for gymangel812

When do you want to check to make sure none of the fields are empty? When the 'add' button is clicked? You need to give more information. Regardless, you'd use an if statement. [CODE] if (buttonName.getText().equals("") || otherButton.getText().equals("")) //do something, your button's text was empty! [/CODE]

Member Avatar for moutanna
0
130
Member Avatar for softdev

It depends how the method is defined; some methods might be defined as "returns XXX under YYY conditions". If so, you could check the returned value for errors. Other than that, I don't know of any ways to do error checking, but Exceptions and return values are really all you …

Member Avatar for BestJewSinceJC
0
67
Member Avatar for goofy_chick

Don't use Eclipse's auto complete as a substitute for documentation and research. For example, did you read [URL="http://java.sun.com/docs/books/tutorial/uiswing/components/table.html"]this[/URL]?

Member Avatar for SasseMan
0
191
Member Avatar for ana_eht

[url]http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Math.html[/url] round()

Member Avatar for fatirnbd
0
116
Member Avatar for tyson.crouch

I would personally make an Object to represent the data coming out of the database, assuming that the data is related. If you want to stuff anything into an array, you can use an ArrayList (or Vector if you need it to be synchronized). If you don't need it to …

Member Avatar for javaAddict
-1
345
Member Avatar for zyaday

[QUOTE=zyaday;1202077] After creating the c object of Class2, is there anyways i can know which class instatiated it[/QUOTE] Yes, because the method that instantiates the 'c' Object is inside of Class1, therefore you already know that it was instantiated inside of Class1. Inside of method1(), the word "this" refers to …

Member Avatar for javaAddict
0
91
Member Avatar for alisonchan30

Call validate() on the JFrame after you reset the panel. You also might want to try creating the GUI like the java tutorials recommend i.e. what they do [URL="http://java.sun.com/docs/books/tutorial/uiswing/examples/components/ComboBoxDemoProject/src/components/ComboBoxDemo.java"]here[/URL]. (Although I don't think it is causing your problem, can't hurt to do it correctly)

Member Avatar for smoothe19
0
175
Member Avatar for customtshirts
Member Avatar for BestJewSinceJC
-7
253
Member Avatar for brian505

[url]http://www.rgagnon.com/javadetails/java-0172.html[/url] Personally I'd just use Jquery though... (which obviously is written in javascript so you could use that like the above link).

Member Avatar for BestJewSinceJC
0
39
Member Avatar for bondgirl21

How do you plan to count the number of words? Do you mean, like, words that would appear in the dictionary? If that is the case then you are going to need to do a dictionary look up of each possible word from your input file. If you count a …

Member Avatar for bondgirl21
0
1K
Member Avatar for kau14
Member Avatar for javastu
Member Avatar for BestJewSinceJC
0
107
Member Avatar for jamesonh20

You could also create your own class that mimics the Scanner class's functionality; you'd basically include a constructor that takes a File Object, and you'd implement your own next() methods, etc... in those methods you could call the Scanner methods and also implement your own custom functionality (calling the AudioClip)

Member Avatar for jamesonh20
0
163
Member Avatar for emmas4impact
Member Avatar for Adak
0
135
Member Avatar for brianmack

Agreed, [I]in this case[/I] your method should be declared as static. In general, however, making methods static is not a good solution. Methods should only be declared static when the method applies to the entire class rather than one specific instance. [url]http://java.sun.com/docs/books/tutorial/java/javaOO/classvars.html[/url] [url]http://leepoint.net/notes-java/flow/methods/50static-methods.html[/url]

Member Avatar for BestJewSinceJC
0
246
Member Avatar for Gez112

1. Restart your computer, click F8 while it is restarting 2. Boot into "safe mode with Networking" 3. Try to double click a program to start it. If double clicking is now working, then you probably have a virus on your computer. Whether or not you have a virus, the …

Member Avatar for Gez112
0
92
Member Avatar for sinister747

Implement the compareTo method of the Comparable interface. [url]http://www.javapractices.com/topic/TopicAction.do?Id=10[/url] [url]http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Comparable.html[/url] [url]http://leepoint.net/notes-java/data/expressions/22compareobjects.html[/url]

Member Avatar for moutanna
0
136
Member Avatar for kvass

Because you never called the reset method from within main. [CODE]public class ArrayReference { /** * @param args */ public static void main(String[] args) { // TODO Auto-generated method stub int[] array = {1, 2, 3, 4, 5}; setArray(array); for (Integer i: array) System.out.println(i); } public static void setArray(int[] array){ …

Member Avatar for kvass
0
97
Member Avatar for pringles08

There is no class called "Char". And you gave us the wrong error message, I'm pretty sure your compiler said "cannot find symbol - Char"

Member Avatar for BestJewSinceJC
1
155
Member Avatar for whimsical1987

I don't really know how to elaborate on the compiler's error message. It literally says exactly what the problem is: you're using a variable "START" which was never declared, which is illegal. Either declare it or get rid of it. It looks useless to me; so delete it. And where …

Member Avatar for JamesCherrill
0
89
Member Avatar for IOwnAndPwnU

No, there isn't. Just follow the directions, it told you what to do. And AFAIK you cannot add the same Swing component to multiple containers. It can only be added somewhere once.

Member Avatar for BestJewSinceJC
0
237
Member Avatar for lllllIllIlllI
Member Avatar for bumsfeld
10
248
Member Avatar for tskellyfla
Member Avatar for nunos

I don't know what the 8 queens problem is. You'd be better off posting this in the Computer Science forum and giving a description of the problem if it is an algorithm question and not strictly a java programming question.

Member Avatar for 0x69
0
128
Member Avatar for Biker920
Member Avatar for mckrm

Does it really matter? A jar file is an executable and therefore, should be sufficient . .

Member Avatar for mckrm
0
80
Member Avatar for gunjannigam

You called "this".repaint(). Try doing [CODE]if (event.getSource() == menuItem) menuItem.repaint();[/CODE]

Member Avatar for JamesCherrill
0
114
Member Avatar for smoothkiller

I took it for you and I answered honestly but your answers won't mean anything. You can't apply generalizations to a community unless you know who that community is composed of...

Member Avatar for Nick Evan
0
259
Member Avatar for Sabryan
Member Avatar for pottsy1985

The first question you asked doesn't even require google. The question isn't about any specific software [if it is, you didn't mention it], it just requires common sense. Most of the others only require a little research and mostly common sense also. For example if you don't know what a …

Member Avatar for jwenting
0
148
Member Avatar for ana12

Their seeds are, because they contain cyanide. It is a low amount, but eating a ton of apple seeds could harm you.

Member Avatar for Lardmeister
-5
256
Member Avatar for Coleman0610

Overall you need to cut out a lot of stuff. Only list your 3 most important jobs and give a brief description of what you did at those jobs and why it is relevant (what skills you learned). You were much too vague at certain points, for example, you mentioned …

Member Avatar for jephthah
0
247
Member Avatar for Graphix

[QUOTE=jephthah;1196035]well, those can be excused becasue the poster thought they were posting a question correctly. the worst is these code snippet "programs" that with deprecated Turbo C libraries: they don't compile, they're so horribly written they're unreadable, and even if you take out the non-standard stuff, they're still broken and …

Member Avatar for diafol
0
174
Member Avatar for bfm

[QUOTE=bfm;1197686]I'm sure this is not the right place to post this, but I thought I'd shout out to everyone to see if there's anyone can help. I have GOT to get off the internet more and I remember vaguely in the back of my mind from a million years ago …

Member Avatar for donaldw
0
174
Member Avatar for sgriffin

Hi Alex, as a software engineer you have a responsibility to learn how to use the internet. (Make your own thread :) )

Member Avatar for Johnsmith1
0
149
Member Avatar for oldgamesware
Member Avatar for Deathblowers
0
139
Member Avatar for Bobon

[QUOTE=Bobon;1196902] So you start the int z at 0 and run it through the length of array and then add the value in the array to the sum if it's less than 10. [/QUOTE] With the correction that you run it through the length of the array - 1, since …

Member Avatar for JamesCherrill
0
86
Member Avatar for BuhRock

[url]http://java.sun.com/docs/books/tutorial/java/javaOO/enum.html[/url] Enum. See the planets example.

Member Avatar for wolstaneye
0
119
Member Avatar for jnthn205

John, [CODE]boolean whatever = first || second;[/CODE] The above expression will store "true" into the variable "whatever" under the condition that first is true [I]or[/I] second is true. If both "first" is false and "second" is false, it will store "false" into "whatever". So, to summarize, unless both "first" and …

Member Avatar for moutanna
0
109
Member Avatar for nwalser

[QUOTE=nwalser;1194736]The Scrabble file should extend Echo, in the standard way we've indicated (it can also extend the LineReader class from Chapter 11 of the text). [/QUOTE] Java classes can only extend one other class, there is no multiple inheritance (some might argue about interfaces but meh). Anyway, what I would …

Member Avatar for BestJewSinceJC
0
1K
Member Avatar for diafol

I agree with closing old threads automatically. If someone has a related question a year later they can make a new thread. The downside (as Vernon mentioned) is losing some good points if someone has something useful to say. But that is a rarity compared to how many times spammers …

Member Avatar for diafol
1
717
Member Avatar for Tops

It passed in a String... T2('12').. scripting languages support operator overloading (I think that's the term) Had it passed in an int you would've been right

Member Avatar for BestJewSinceJC
0
127
Member Avatar for Sharon5

Yeah, perhaps if you keep posting that question everywhere, we'll be more likely to help you with it.

Member Avatar for BestJewSinceJC
0
490
Member Avatar for zyaday

It isn't a good or a bad practice. It just depends on what your application is. Usually passing a List to a constructor would be fine...

Member Avatar for BestJewSinceJC
0
48

The End.