Search Results

Showing results 1 to 34 of 34
Search took 0.01 seconds.
Search: Posts Made By: majestic0110 ; Forum: Java and child forums
Forum: Java Oct 18th, 2009
Replies: 7
Solved: Java Scanners
Views: 346
Posted By majestic0110
Take a look at Line 23 where you declare the int variable vacation. This variable is declared within the body of a conditional statement, which means its lifespan is confined to that conditional...
Forum: Java Oct 16th, 2009
Replies: 11
Views: 376
Posted By majestic0110
here (http://java.sun.com/docs/books/tutorial/uiswing/events/actionlistener.html)
Forum: Java Oct 7th, 2009
Replies: 4
Views: 319
Posted By majestic0110
nomemory means compile the classes then run TestCircle. You cannot run Circle directly as it has no main method. main is the entry point for you program. As nomemory said, don't skip the basics....
Forum: Java Oct 3rd, 2009
Replies: 4
Views: 300
Posted By majestic0110
Take a look at line 91:

mbar.add(mnuHelp);

mnuHelp has NOT been initialized, so you will get a Null Pointer Exception. To rectify this, initialize mnuHelp where you initialize the other two...
Forum: Java Oct 3rd, 2009
Replies: 4
Views: 300
Posted By majestic0110
What is the exact error message? Is it a compilation error? Or a runtime exception you are encountering?
Forum: Java Oct 3rd, 2009
Replies: 11
Views: 386
Posted By majestic0110
You could use the escape sequence "\n" after you print out the 4th element in the array? Or use just System.out.println(); after the 4th element has been printed.
Forum: Java Sep 30th, 2009
Replies: 3
Solved: Check Code
Views: 266
Posted By majestic0110
You have not specified a constructor for class Complex that accepts two doubles as parameters. There are two things you could do:

1- Rename void "setValue" to "public Complex" and give the Complex...
Forum: Java Sep 29th, 2009
Replies: 4
Views: 222
Posted By majestic0110
You are welcome, it's often the obvious things that we all miss! Please mark the thread as solved!
Forum: Java Sep 29th, 2009
Replies: 4
Views: 222
Posted By majestic0110
On line 15, you are parsing the user input to an integer, and integers do not function with decimals. Parse the input string to a double:

double mileage = Double.parseDouble(mileageInput);
Forum: Java Sep 27th, 2009
Replies: 2
Views: 323
Posted By majestic0110
I wrote a paint application quite recently in Java actually, if you are willing to show effort and make a start - then you could come back with specific questions. I, and my peers will no doubt be...
Forum: Java Sep 27th, 2009
Replies: 2
Views: 283
Posted By majestic0110
As quuba said, you have declared panelCenter2 but you are still adding the JButtons jn4, jn5 and jn6 to panelCentre1 - which is positioned using BorderLayout.CENTER. Hence why your last three buttons...
Forum: Java Sep 22nd, 2009
Replies: 6
Views: 371
Posted By majestic0110
Ok the problem there is that you have not initialized the variable MenuBar before you call the method buildMenus() on it, therefore you get a null pointer exception. You need to initialize MenuBar...
Forum: Java Sep 22nd, 2009
Replies: 6
Views: 371
Posted By majestic0110
You need to add:

notepadFrame.add(MenuBar);

before you set notepadFrame.setVisible(true);. This adds the MenuBar to the Frame.
Forum: Java Sep 22nd, 2009
Replies: 6
Views: 371
Posted By majestic0110
Peter_budo you beat me to it! :) Kahaj, what you could do is :

declare and initialize MenuBar as a class field, instead of a local variable in method buildMenus() :

JMenuBar MenuBar;

you can...
Forum: Java Sep 22nd, 2009
Replies: 4
Views: 400
Posted By majestic0110
lol thanks for that Jasimp, silly me! :)
Forum: Java Sep 22nd, 2009
Replies: 4
Views: 400
Posted By majestic0110
You need to add ItemListener to your combo-box. The sun tutorial is brilliant, look here :

http://http://java.sun.com/docs/books/tutorial/uiswing/components/combobox.html

I hope that helps!
...
Forum: Java Sep 10th, 2009
Replies: 3
Views: 247
Posted By majestic0110
Hi kkcaddy, you need to add the .java extension to the javac command in order to compile a java file. I.e:



then you can run the file by using the java command like so:



You can find more...
Forum: Java Sep 10th, 2009
Replies: 1
Views: 236
Posted By majestic0110
You need the JVM to execute Jar files. The JVM is part of the JRE (Java Runtime Environment) or JDK (Java Development Kit). Only Java developers will need the JDK though, so if you just want to run a...
Forum: Java May 13th, 2008
Replies: 9
Views: 2,654
Posted By majestic0110
Do you mean a tooltip, where text is displayed over a "hovered " button ?
Forum: Java Apr 15th, 2008
Replies: 18
Solved: Reset applet
Views: 2,150
Posted By majestic0110
No, it will still generate a random number because you put that in init() too:
Forum: Java Apr 14th, 2008
Replies: 18
Solved: Reset applet
Views: 2,150
Posted By majestic0110
Ezzaral, you are a genius. I have been trying to figure this out for Adila for ages!
Forum: Java Apr 14th, 2008
Replies: 18
Solved: Reset applet
Views: 2,150
Posted By majestic0110
I am a bit stumped here buddy, when I run it, 9 out ten times the buttons don't show?
Forum: Java Apr 14th, 2008
Replies: 18
Solved: Reset applet
Views: 2,150
Posted By majestic0110
The buttons I mean?
Forum: Java Apr 14th, 2008
Replies: 18
Solved: Reset applet
Views: 2,150
Posted By majestic0110
Does the grid show when you compile and run it on your machine ?
Forum: Java Apr 14th, 2008
Replies: 18
Solved: Reset applet
Views: 2,150
Posted By majestic0110
Well, I presume that at some point in your code your applet is initialised and all the variables are set up. You need your Reset function to re - set these variables to their initial states, without...
Forum: Java Apr 14th, 2008
Replies: 18
Solved: Reset applet
Views: 2,150
Posted By majestic0110
Hi there, I think you will need to write your own reset method:
Forum: Java Mar 17th, 2008
Replies: 10
Views: 3,363
Posted By majestic0110
Forum: Java Mar 17th, 2008
Replies: 10
Views: 3,363
Posted By majestic0110
lol just googled it. love the "package once deploy everywhere" tag!
Forum: Java Mar 17th, 2008
Replies: 10
Views: 3,363
Posted By majestic0110
not heard of IzPack before Ezzaral will investigate lol
Forum: Java Mar 17th, 2008
Replies: 10
Views: 3,363
Posted By majestic0110
if you are aiming at a windows o/s for your installation try this:



otherwise try this:



hope this helps.
Forum: Java Jan 22nd, 2008
Replies: 5
Views: 1,281
Posted By majestic0110
also ensure your firewall is set to allow connections on port 8080
Forum: Java Jan 8th, 2008
Replies: 19
Solved: Homework help
Views: 1,736
Posted By majestic0110
I think the general feeling is that we are all here to help each other and interact with each other but a little respect and effort is all we ask
Forum: Java Jan 7th, 2008
Replies: 19
Solved: Homework help
Views: 1,736
Posted By majestic0110
i love this community, but the amount of 'homework hackers' that post here is irritating
Forum: Java Jan 6th, 2008
Replies: 19
Solved: Homework help
Views: 1,736
Posted By majestic0110
hmmm thats not at all vague! you know we like to see some effort before we help!
Showing results 1 to 34 of 34

 


About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC