• Post Reply Bookmark Topic Watch Topic
  • New Topic

setting the value of a JCheckBox dynamically[urgent...]

 
netharam ram
Ranch Hand
Posts: 202
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, I want to set the value of a checkbox to be set dynamically.(i.e) if the user selects a menutiem I want the checkbox to be checked & another menutiem,the ckeckbox to be unchecked.Plz. don't suggest to use a checkbox in the JMenutiem.I want to set the value dynamically,according to the user's choice.
Happy middling with java. :
Netharam. :roll:
 
Manfred Leonhardt
Ranch Hand
Posts: 1492
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
It probably took you more time to type your post then to look at the Java API and figure out how to do it ...
Register actionListener on menuItem
Inside actionListener method you use Checkbox method setSelected.
NOTE: Every post you write is urgent ... did you ever hear the saying "Crying wolf". You need to stop drinking so much coffee, take deep breaths, and relax!
Regards,
Manfred.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!