This section illustrates you how to create radio button.
In SWT, the style RADIO defined in the Button class allows to create radio button. We have create an array object of Button class. The class Label displays the specified string. The method label.setText() sets the string specified. The setBounds() sets the location.
The method radioButton[].setSelection(true) sets the selection state.
Here is the code of RadioButtonExample.java
import org.eclipse.swt.SWT;
|
Output will be displayed as:

If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.
Ask Questions? Discuss: Create Radio Buttons in SWT View All Comments
Post your Comment