import java.awt.*;
public class FlowAp extends Frame{
public static void main(
String argv[]){
FlowAp fa=new FlowAp();
fa.setSize(400,300);
fa.setVisible(true);
}
FlowAp(){
setLayout(new GridLayout());
add(new Panel());
add(new Button("One"));
add(new Button("Two"));
add(new Button("Three"), "North");
add(new Button("Four"), "South");
}
}
the running result is "A panel and buttons marked One to four running from the left to right "
why?
I thought it would be " An Error at compile time indicating add is called with invalid parameters. "
add(new Button("Three"), "North"); add(new Button("Four"), "South"); Can this way be used for
GridLayout Manager?
add(new Button("Three"), "North"); add(new Button("Four"), "South"); Can this way be used for gridlayout [ June 06, 2002: Message edited by: weiliu lili ]