⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 testnesting.java~33~

📁 提供了常用的JAVA技术的示例
💻 JAVA~33~
字号:
// 12-8 容 器 嵌 套 。package Nesting;import java.awt.*;public class TestNesting{    private Frame f;    private Panel p;    private Button bw,bc;    private Button bfile,bhelp;    private TextArea ta;    public void create(){        f=new Frame("容器嵌套");        f.setSize(400,300);        ta=new TextArea("text area");        bw=new Button("West");        bc=new Button("work space region");        f.setLayout(new BorderLayout());        f.add(bw,"West");        f.add(bc,"East");        p=new Panel();        p.setLayout(new BorderLayout());        f.add(p,"South");        bfile=new Button("文件");        bhelp=new Button("帮助");        p.add(bfile,"West");        p.add(bhelp,"North");        p.add(ta,"Center");        //f.pack();        f.setVisible(true);    }    public static void main(String[] args) {      TestNesting test = new TestNesting();      test.create();    }}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -