borderlayoutdemo.java~2~

来自「java2参考大全上的例子的源码和自己的理解.」· JAVA~2~ 代码 · 共 23 行

JAVA~2~
23
字号
import java.awt.*;import java.applet.*;import java.util.*;public class BorderLayoutDemo extends Applet{   public void init()   {      setLayout(new BorderLayout());      add(new Button("This is arross the top"),              BorderLayout.NORTH);      add(new Label("The message is on the bottom"),              BorderLayout.SOUTH);      add(new Button("Left"),BorderLayout.WEST);      add(new Button("Right"),BorderLayout.EAST);      String message="This is the message in the Center!";      add(new TextArea(message),BorderLayout.CENTER);   }}

⌨️ 快捷键说明

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