[java]代码库
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
public class Chp13_3 extends JFrame{
private JButton denglu,quxiao;
private JLabel label1,label2;
private JTextField field1,field2;
private Container container;
Chp13_3(){
super("登录");
container = getContentPane();
container.setLayout(new FlowLayout());
label1 = new JLabel("账号");
field1 = new JTextField(15);
container.add(label1);
container.add(field1);
label2 = new JLabel("密码");
field2 = new JTextField(15);
container.add(label2);
container.add(field2);
denglu = new JButton("登录");
quxiao = new JButton("取消");
container.add(denglu);
container.add(quxiao);
setSize(220,200);
setVisible(true);
}
初级程序员
by: 云代码会员 发表于:2018-06-27 09:08:30 顶(0) | 踩(1) 回复
11111
回复评论