hi all:
I think the only correct answer is 2.just try below code to validate it.
import java.awt.*;
public class test extends Frame{
public static void main(
String agrs[]){
test t = new test();
}
test(){
super("my frame");
setLayout(new GridLayout(2,2));
setSize(100,100);
add(new Button("botton1"));
add(new Button("botton1"));
add(new Button("botton1"));
add(new Button("botton1"));
add(new Button("botton1"));
setVisible(true);
}
}
you will find the Frame's size isn't increased to allow the buttons full showed.In the contrast,the Button will be truncated.