【文件属性】:
文件名称:亲密数对的鉴定
文件大小:2KB
文件格式:JAVA
更新时间:2016-01-22 06:15:02
亲密数
实验题目super("亲密数鉴定");
this.setBounds(300,300,230,180);
this.setBackground(java.awt.Color.lightGray);
this.setLayout(new java.awt.FlowLayout(FlowLayout.CENTER));
for(int i=0;i<3;i++)
{
texts[i]=new JTextField();
}
this.add(new Label("输入第一个数"));
texts[0]=new JTextField(10);
this.add(texts[0]);
this.add(new Label("输入第二个数"));
texts[1]=new JTextField(10);
this.add(texts[1]);
this.add(new Label(" 结果 "));
texts[2]=new JTextField(10);
this.add(texts[2]);
button_2=new Button("查询结果");
texts[2].setEditable(false);
this.add(button_2);
button_2.addActionListener(this);
this.addWindowListener(new WinClose());
this.setVisible(true);