📄 8-8-2.txt
字号:
package Untitled10;
import java.awt.*;
import com.borland.jbcl.layout.*;
import java.awt.event.*;
public class Frametest extends Frame {
XYLayout xYLayout1 = new XYLayout();
Label label1 = new Label();
TextField textField1 = new TextField();
Label label2 = new Label();
TextArea textArea1 = new TextArea();
Button button1 = new Button();
Button button2 = new Button();
public Frametest() {
try {
jbInit();
}
catch(Exception e) {
e.printStackTrace();
}
}
private void jbInit() throws Exception {
label1.setText("您的姓名:");
this.setBackground(Color.lightGray);
this.setBackground(Color.lightGray);
this.setTitle("留言板");
this.setLayout(xYLayout1);
label2.setText("您的建议:");
textArea1.setText("我认为:");
button1.setLabel("复位");
button2.setLabel("提交");
xYLayout1.setHeight(227);
xYLayout1.setWidth(293);
this.add(label1, new XYConstraints(40, 0, 60, 28));
this.add(textField1, new XYConstraints(101, 5, 96, 20));
this.add(label2, new XYConstraints(2, 30, 72, 17));
this.add(textArea1, new XYConstraints(1, 49, 270, 112));
this.add(button2, new XYConstraints(56, 169, 59, 19));
this.add(button1, new XYConstraints(139, 168, 59, 19));
}
public static void main(String[] args)
{ Frametest frm=new Frametest();
frm.setSize (280,220);
frm.setVisible(true);
}
?
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -