JRadioButtonTest.java Creates three radio buttons and illustrates handling ItemEvents in response to selecting a radio button. import javax.swing.JRadioButton; import javax.swing.ButtonGroup; import java.awt.*; import java.awt.event.*; import javax.swing.*; /** */ public class JRadioButtonTest extends JPanel implements ItemListener { public JRadioButtonTest() { String[] labels = {"Java Swing","Java Servlets", "JavaServer Pages"}; JRadioButton[] buttons = new JRadioButton[3]; ButtonGroup group = new ButtonGroup(); for(int i=0; i
Creates three radio buttons and illustrates handling
Permanent link to this article: http://bangla.sitestree.com/creates-three-radio-buttons-and-illustrates-handling/