hello all,
I want to set the size for the panel within a frame. When i run the below i get a small pink panel with the buttons at the bottom of the frame, but i am not able to increase the size of the panel. i tried to add the line 14 but does not help.
Kindle help me.
import java.awt.*;
public class CompLay extends Frame{
public static void main(
String argv[]){
CompLay cl = new CompLay();
}
CompLay()
{
Panel p = new Panel();
p.setBackground(Color.pink);
p.add(new Button("One"));
p.add(new Button("Two"));
p.add(new Button("Three"));
add("South",p);
// setLayout(new FlowLayout());
Line 14//p.setSize(300,300);
setSize(600,600);
setVisible(true);
}
}
thanks mala