Results 1 to 4 of 4
  1. #1
    Aniczka is offline Member
    Join Date
    Oct 2009
    Posts
    4
    Rep Power
    0

    Default RadioButton clearSelection Problem

    Hi,there!I was looking for the answer how to deselct radio buttons.Found the thread "[SOLVED] Radio Buttons - Reset - clear dot ".I was so happy that I found it...Until i typed buttongroupname.clearSelection() into my code in Netbeans and Netbeans informed me that this method doesn't exist in ButtonGroup class,even though it is listed on java sun's api..:confused:Someone help,please???radiobuttonname.setSelected(false) didn't work for me.After refreshing the frame last radio button was selected...THANKS!!

  2. #2
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,315
    Blog Entries
    1
    Rep Power
    26

    Default

    The problem is likely that this is a method found in Java 1.6. If you are using 1.5 or have your compiler set to compile at the 1.5 (or lower level), change to 1.6.

  3. #3
    Aniczka is offline Member
    Join Date
    Oct 2009
    Posts
    4
    Rep Power
    0

    Default

    Thanks!I had 1.6,but I reinstalled jdk and netbeans after I read your post.It worked after that.I wouldn't think of this without your post.

  4. #4
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,315
    Blog Entries
    1
    Rep Power
    26

Similar Threads

  1. uses of radiobutton...
    By mlibot in forum New To Java
    Replies: 22
    Last Post: 09-17-2009, 09:33 AM
  2. RadioButton selections in an Exam application
    By riddhikarnik in forum AWT / Swing
    Replies: 6
    Last Post: 06-29-2009, 05:41 AM
  3. freeze radioButton without disable them
    By itaipee in forum AWT / Swing
    Replies: 5
    Last Post: 05-25-2009, 10:29 AM
  4. RadioButton
    By tiger100plus in forum New To Java
    Replies: 1
    Last Post: 01-05-2009, 09:04 PM
  5. radiobutton selection
    By newtojava7 in forum New To Java
    Replies: 1
    Last Post: 03-17-2008, 03:58 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
  •