填空题

以下程序使用Gridlayout布局管理器使容器中各个构件呈网状布局,请将代码填写完整,使程序能够正确执行。 import java.awt. *; public class exam_3 { public static void main (string args [] ) { Frame f= 【12】 ; f.setLayout (new GridLayout (3, 2 ) ); f.add (new Button ("1")); f.add (new Button ("2")); f.add (new Button ("3")); f.add (new Button ("4")); f.add (new Button ("5")); f.add (new Button ("6")); f.setSize (200,300); f.setvisible (true); } }

【参考答案】

new Frame("GridLayout")