Results 1 to 4 of 4
  1. #1
    doron70 is offline Member
    Join Date
    Jul 2007
    Posts
    4
    Rep Power
    0

    Default JMenu and JRadioButtonMenuItem

    Hi,
    When I catch the selection of the radio button in the ActionListener, I would also to know which JMenu object, which is the submenu that consists the radio buttons, was chosen (I have the same radio button names in different submenus)
    how do I do so ?

    thanks

  2. #2
    JavaBean's Avatar
    JavaBean is offline Moderator
    Join Date
    May 2007
    Posts
    1,270
    Rep Power
    9

    Default

    Check "command" and "source" variables in ActionEvent class. Both can be used to catch selection of your radio buttons.

  3. #3
    doron70 is offline Member
    Join Date
    Jul 2007
    Posts
    4
    Rep Power
    0

    Default you didn't understand

    I want to catch the submenu which is the father of the selected radio button

  4. #4
    JavaBean's Avatar
    JavaBean is offline Moderator
    Join Date
    May 2007
    Posts
    1,270
    Rep Power
    9

    Default

    Ok. I understand now. I think you will need to capture events of super classes (e.g. JComponent) to do that. But i dont know which one, you will need to try them if you did not.

Similar Threads

  1. Replies: 3
    Last Post: 01-06-2008, 12:13 AM
  2. JMenu calling another Forms/Panels
    By plodos in forum New To Java
    Replies: 2
    Last Post: 12-10-2007, 09:02 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •