Lukus Posted April 19, 2009 Share Posted April 19, 2009 I installed Java and BlueJ for a project, I've got Breezyswing + TerminalIO installed in the directories; jre6/lib/ext jdk1.6.0_13/lib Here's my code; Code Also in BlueJ, claiming it's loaded and system wide. I compile fine and everything works, but then when I run the program I get this.. Any ideas? I'm stumped! Link to comment Share on other sites More sharing options...
0 _kane81 Posted April 20, 2009 Share Posted April 20, 2009 try this /** * Write a description of class MasterMind here. * * Luke Wotton * 19/4/2009 */ public class MasterMind extends GBFrame { JLabel NewGame; JLabel Guess; IntegerField Guess1; public MasterMind() { NewGame = addLabel ("New Game", 1, 2, 1, 1); Guess = addLabel ("Guess", 0, 0, 1, 1); Guess1 = addIntegerField (0,1,1,1,1); } public static void main (String[] args){ MasterMind tpo = new MasterMind(); tpo.setSize (400, 500); //Set the window's size in pixels tpo.setVisible (true); //Make the window visible }// end main } I think your problem is you are trying to use addIntegerField(), addLabel() without a context / object has not been init yet. if you do it in the constructor, I suspect your problem will go away. Link to comment Share on other sites More sharing options...
0 Lukus Posted April 20, 2009 Author Share Posted April 20, 2009 Thanks for the reply, but it sadly didn't work. Could it be something to do with my libraries? I've installed BlueJ and the latest JDK on 2 machines and get this same error on both. Yet if I change Import BreezySwing.*' to Import BreezyGUI.* It works. Am I missing something? Link to comment Share on other sites More sharing options...
0 Andre S. Veteran Posted April 20, 2009 Veteran Share Posted April 20, 2009 I suppose you should import BreezyGUI.* then. :ermm: Link to comment Share on other sites More sharing options...
0 Lukus Posted April 20, 2009 Author Share Posted April 20, 2009 Well... Now here's a story. Our lecturer gives us a link to the JDK 6 Update 13. Which doesn't work when using Breezyswing as an input method it seems. I've since downloaded Update 11 which works. What a complete idiot of a bloke. Link to comment Share on other sites More sharing options...
Question
Lukus
I installed Java and BlueJ for a project, I've got Breezyswing + TerminalIO installed in the directories;
jre6/lib/ext
jdk1.6.0_13/lib
Here's my code;
Code
Also in BlueJ, claiming it's loaded and system wide.
I compile fine and everything works, but then when I run the program I get this..
Any ideas? I'm stumped!
Link to comment
Share on other sites
4 answers to this question
Recommended Posts