Results 1 to 4 of 4

Thread: JRadioButton's not being clicked when clicked--?

Threaded View

  1. #1

    Thread Starter
    Frenzied Member System_Error's Avatar
    Join Date
    Apr 2004
    Posts
    1,111

    Resolved JRadioButton's not being clicked when clicked--?

    I have a JMenu with some radio buttons...For some reason, when I click the stupid things, they won't do anything...and by that, I mean they want change their state to being clicked(as in the circle being filled)..It's like they are disabled...I'll post the snippets of code with them in it:

    Code:
    	JMenu formatMenu = new JMenu("Format");
    		ButtonGroup bg = new ButtonGroup();	
    		rb0 = new JRadioButton("###",false);
    		rb0.addActionListener(this);
    		rb2 = new JRadioButton("###.##",true);	
    		rb2.addActionListener(this);
    		rb4 = new JRadioButton("###.####",false);
    		rb4.addActionListener(this);	
    		rb6 = new JRadioButton("###.######",false);
    		rb6.addActionListener(this);
    		
    		bg.add(rb0);
    		bg.add(rb2);
    		bg.add(rb4);
    		bg.add(rb6);
    		formatMenu.add(rb0);
    		formatMenu.add(rb2);
    		formatMenu.add(rb4);
    		formatMenu.add(rb6);
    Why would I not be able to click these buttons?


    <Moderator added green check mark>
    Last edited by NoteMe; Feb 21st, 2005 at 09:17 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
  •  



Click Here to Expand Forum to Full Width