Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

1st Radio Button always being true in Jface /swt  RSS feed

 
Keith Spriggs
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Marshal
Posts: 55685
162
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!