• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Still stuck-taking different approach plz help

 
Kendra Payne
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 961
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 4632
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I fixed and got it to compile but it is a blank white frame. The buttons are not there.
 
Michael Dunn
Ranch Hand
Posts: 4632
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic