Hi,
Pls can anybody help me , Why the frame is blank.
import java.awt.*;
public class CompLay extends Frame{
public static void main(
String argv[]){
CompLay cl = new CompLay();
}
CompLay(){
setLayout(new FlowLayout());
Panel p = new Panel();
p.setBackground(Color.pink);
p.add(new Button("One"));
p.add(new Button("Two"));
p.add(new Button("Three"));
Panel p1 =new Panel();
p1.setBackground(Color.red);
p1.add(new Button("four"));
add(p);
add(p1);
setLayout(new BorderLayout());
setSize(300,300);
setVisible(true);
}
}
If you convert from BorderLayout to FlowLayout, u can see the result but why vice versa is not showing any result.Pls help me
Prasad
------------------