This week's book giveaway is in the Jython/Python forum.
We're giving away four copies of Murach's Python Programming and have Michael Urban and Joel Murach on-line!
See this thread for details.
Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

GUI menu not changing colors  RSS feed

 
George Avilez
Ranch Hand
Posts: 60
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Borders ---> Lined Border ---> click any size ---> Black
If you click the borders menu bar, then go down and click Lined borders and choose any size then click black, Shouldn't the whole menu turn black? Not sure what I'am doing wrong I followed many examples carefully but not all apply to my code ya know? SO asking you guys if you can help. Line 107-114 is the location where I'm expecting the code to color my menu so take a look at the portion. And the black panel is at lines 22-24. Anything else should be easy to locate with comments if needed.



 
Piet Souris
Rancher
Posts: 1783
55
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi Georg,

you put your ActionListener to your JMenu (line 28, f.e.), but you should add your ActionListener to one of your JMenuItems instead
(line 69 and a half, for instance).
Then it should work.

Greetings,
Piet
 
George Avilez
Ranch Hand
Posts: 60
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Awesome thank you =)
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!