Panel toppanel=new Panel();frame.add(toppanel);toppanel.setLayout(new GridLayout(1,4,3,3));/

来源:学生作业帮助网 编辑:六六作业网 时间:2024/11/27 16:03:52
Paneltoppanel=newPanel();frame.add(toppanel);toppanel.setLayout(newGridLayout(1,4,3,3));/Paneltoppan

Panel toppanel=new Panel();frame.add(toppanel);toppanel.setLayout(new GridLayout(1,4,3,3));/
Panel toppanel=new Panel();
frame.add(toppanel);
toppanel.setLayout(new GridLayout(1,4,3,3));/

Panel toppanel=new Panel();frame.add(toppanel);toppanel.setLayout(new GridLayout(1,4,3,3));/
创建一个Panel容器,因为panel容易不能单独存在,
将panel容易添加到 frame容器中,
设置panel容器的布局管理器为 GridLayout.