Hi All,
Possibly this is a repeat thread, but help on this.
I need to create new instance of JRadioButton within loop uniquly which I can refer in a program.
Here's the snapshot
JRadioButton className1 = new JRadioButton("test1");
className.setMnemonic(KeyEvent.VK_A);
className.setActionCommand("test1");
className.setSelected(true);
JRadioButton className2 = new JRadioButton("test2");
className.setMnemonic(KeyEvent.VK_B);
className.setActionCommand("test2");
className.setSelected(true);
JRadioButton className3 = new JRadioButton("test3");
className.setMnemonic(KeyEvent.VK_C);
className.setActionCommand("test3");
className.setSelected(true);
the object should be instantiated dynamically with the values retrieved from loop and this dynamic object, I should be able to use it anywhere in the program for further use.
Any help will be appreciated, Thanks in advance
Possibly this is a repeat thread, but help on this.
I need to create new instance of JRadioButton within loop uniquly which I can refer in a program.
Here's the snapshot
JRadioButton className1 = new JRadioButton("test1");
className.setMnemonic(KeyEvent.VK_A);
className.setActionCommand("test1");
className.setSelected(true);
JRadioButton className2 = new JRadioButton("test2");
className.setMnemonic(KeyEvent.VK_B);
className.setActionCommand("test2");
className.setSelected(true);
JRadioButton className3 = new JRadioButton("test3");
className.setMnemonic(KeyEvent.VK_C);
className.setActionCommand("test3");
className.setSelected(true);
the object should be instantiated dynamically with the values retrieved from loop and this dynamic object, I should be able to use it anywhere in the program for further use.
Any help will be appreciated, Thanks in advance