aspose file tools*
The moose likes Beginning Java and the fly likes Still stuck-taking different approach plz help Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Still stuck-taking different approach plz help" Watch "Still stuck-taking different approach plz help" New topic
Author

Still stuck-taking different approach plz help

Kendra Payne
Greenhorn

Joined: Oct 17, 2006
Posts: 22
I have completely changed my code and am still getting errors and have no idea whatsoever what is wrong. Please help if you can.
Thanks in advance.
Edwin Dalorzo
Ranch Hand

Joined: Dec 31, 2004
Posts: 961
Well, at first sight... you class is named ColorButtons2 but your constructor says ColorButtons.

Fix that and it should compile and run.
Michael Dunn
Ranch Hand

Joined: Jun 09, 2003
Posts: 4632
because of this
Checkbox blue, red, yellow, pink, gray;

all of these
Checkbox blue = new Checkbox("Blue",false,colorGroup);

should be just
blue = new Checkbox("Blue",false,colorGroup);
Kendra Payne
Greenhorn

Joined: Oct 17, 2006
Posts: 22
I fixed and got it to compile but it is a blank white frame. The buttons are not there.
Michael Dunn
Ranch Hand

Joined: Jun 09, 2003
Posts: 4632
if you changed the constructor to ColorButtons2, did you also change this in main()
ColorButtons cb = new ColorButtons();

if not, you might be working with an old compiled class
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Still stuck-taking different approach plz help