|
-
May 22nd, 2003, 02:10 AM
#1
Thread Starter
Lively Member
JAVA GUI stuff
1. on radiobuttons:
JRadioButton a= new JRadioButton("A");
JRadioButton b= new JRadioButton("B");
ButtonGroup bg = new ButtonGroup();
bg.add(a); bg.add(b);
JPanel mode = new JPanel(new GridLayout(1, 1));
mode.add(bg);
ERROR:
Incompatible type for method. Can't convert javax.swing.ButtonGroup to java.awt.Component.
eh?
2. also, how do i use the isSelected method so that radiobutton "A" is selected on load?
3. finally, x.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); in void main, but it doesn't work, something like EXIT_ON_CLOSE not declared...
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|