📄 labelexample.java
字号:
import java.awt.*;
public class LabelExample {
static public void main(String[] args) {
Frame f;
Label l1,l2,l3;
f = new Frame("Label Example");
f.setLayout( new GridLayout( 3, 1, 30, 30 ) );
l1 = new Label( "Hello, this is Label1" ) ;
l2 = new Label( "Hello, this is Label2" ) ;
l3 = new Label( "Hello, this is Label3" ) ;
f.add(l1);
f.add(l2);
f.add(l3);
f.setSize(300,200);
f.setVisible(true);
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -