• Post Reply Bookmark Topic Watch Topic
  • New Topic

struggling with cycling background colors with one button

 
David Borchgrevink
Ranch Hand
Posts: 93
2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
so i'm supposed to create a jframe with only 1 button. each time you push the button it is supposed to go from red to green to blue to gray and back to red starting over. i am literally pulling my hair out. i have been at this for hours and after trying everything i can possibly think of, all i can get is the background to change on the first click, then the button is useless for eternity.

here is my code:



if somebody has any ideas, i would love it. throwing my computer at the wall doesn't seem like a viable option...

thanks
 
David Borchgrevink
Ranch Hand
Posts: 93
2
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thank sweet baby jesus i got this figured out....




i think i need a shot. not for how long this took me, but for what lies ahead...
 
Maneesh Godbole
Bartender
Posts: 11445
18
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well done! And you just earned yourselves a cow for coming back and sharing your solution*!

 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!