• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Integrating menuItem and JButton

 
Kashif Iqbal Khan
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

My question is that is there anyway to fire action object when menuItem's state is changed?
The menuItem and toolbar button for that action perform same task so they must represent the same state like both disabled or enabled.
[ January 23, 2004: Message edited by: Kashif Khan ]
 
Craig Wood
Ranch Hand
Pie
Posts: 1535
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
I'm not sure I understand your question very well. In the code below the actionPerformed method, and methods in general, do not hold state. The class that the method is in can hold state. And yes, you can certainly arrange for your JCheckBoxMenuItem to fire events.
Maybe you can use this example app to clarify what you want.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic