📄 multicomponentsdemo1_gui.java
字号:
/**
*A simple example using Label,Button and Frame components
*2004.11.27. xhcprince
*/
import java.awt.*;
import java.applet.*;
public class multicomponentsDemo1_GUI extends Applet
{
public multicomponentsDemo1_GUI()
{
add(new Label("First name"));
add(new TextField(10));
add(new Label("Second name"));
add(new TextField(10));
add(new Label("Password"));
add(new TextField(10));
add(new Button("Save"));
}
public static void main(String args[])
{
multicomponentsDemo1_GUI M = new multicomponentsDemo1_GUI();
M.setVisible(true);
M.setSize(400,300);
}
}
/*
<applet code = "multicomponentsDemo_GUI.class" width = 600 height = 600>
</applet>
*/
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -