i was wondering why buttons will run from left to right along the top of the frame. I thought the buttons will stay at the button since the layout has been set to the south initially at line 12. Do i need a validate() to apply borderlayout follow by flowlayout? pleaseeeee help.
thanks, yuki
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); //12
setLayout(new FlowLayout());
setSize(300,300);
setVisible(true);
}
}