import java.awt.*; import java.awt.event.*; public class CheckgroupApp extends Frame implements ItemListener
private CheckboxGroup nn = new CheckboxGroup(); public showGui() { setLayout(new GridLaout(4,1); add()// seVisible();//without using instance of Frame class..i dont understand..
///some code
my question is why i have to use an instane of Frame class to add components directly..
Michael Dunn
Ranch Hand
Joined: Jun 09, 2003
Posts: 4632
posted
0
> my question is why i have to use an instane of Frame class to add components directly..
you need on instance of a Frame/JFrame to work with - it is a top level container
either
kieran pattni
Ranch Hand
Joined: Jan 19, 2004
Posts: 47
posted
0
sorry my error..Q? was why i dont have to use a instance of the Frame class..
Michael Dunn
Ranch Hand
Joined: Jun 09, 2003
Posts: 4632
posted
0
> sorry my error..Q? was why i dont have to use a instance of the Frame class..
by extending Frame, the class is a Frame, and inherits all the methods of Frame