....
static Graphics g = Graphics.getGraphics();
//这里构造用户界面(如图1)
Button button5 = new Button(“Exit”,117,139);
Button button4 = new Button(“Clear”,69,139);
Button button3 = new Button(“Send”,20,139);
TextField textField2 = new TextField(“Please Data Here”,13,96,139,33);
TextBox textBox1 = new TextBox(“This is the message that this\n System
Received!\n\n”,15,8,137,73);
//构造方法。
public BeamDemo() {
button5.setEnabled(true);
button4.setEnabled(true);
button3.setEnabled(true);
textField2.setUpperCase(false);
textField2.setText(“”);
paint();
}
|