wood burning stoves 2.0*
The moose likes Swing / AWT / SWT and the fly likes 1st Radio Button always being true in Jface /swt Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "1st Radio Button always being true in Jface /swt" Watch "1st Radio Button always being true in Jface /swt" New topic
Author

1st Radio Button always being true in Jface /swt

Keith Spriggs
Greenhorn

Joined: Jul 19, 2012
Posts: 18
Hi Guys,
Here is a puzzler, every time I create a group of radio buttons in SWT/JFace, the first button is always true, but if create a standard button and call it to reset the radio button it will reset to being false.
I would like it to be set to false as default.
Has any encountered a problem like this and how to solve it?
Thanks in advance

Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 36453
    
  15
In this section of the Java™ Tutorials, the second and third subsections are about buttons and button groups. Have a look. You can use the setSelected method and/or a boolean parameter in the constructor to pre‑select a particular radio button.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: 1st Radio Button always being true in Jface /swt
 
Similar Threads
Prepopulating Radio buttons in JSP
display radio button as selected
want to get the value of selected radio button
difference between Swing, SWT and Jfaces?
radio button using javascript DOM