第十三周作业第二题

import java.awt.*;
import javax.swing.*;
public class L5_7  extends JFrame{
 JButton an1,an2;
 JPanel  mb1,mb2,mb3;
 JLabel  bq1,bq2;
 JTextField wb1;
 JPasswordField mmk;
 L5_7(){
  mb1=new JPanel();
  mb2=new JPanel();
  mb3=new JPanel();
  an1=new JButton("登陆");
  an2=new JButton("取消");
  bq1=new JLabel("用户名");
  bq2=new JLabel("密   码");
  wb1=new JTextField(10);
  mmk=new JPasswordField(10);
  
  this.setLayout(new GridLayout(3,1));
  
  mb1.add(bq1);  mb1.add(wb1);
  mb2.add(bq2);  mb2.add(mmk);
  mb3.add(an1);  mb3.add(an2);
  
  this.add(mb1);
  this.add(mb2);
  this.add(mb3);
  
  this.setTitle("用户登录界面");
  this.setSize(230,150);
  this.setLocation(200, 300);
  this.setResizable(true);
  this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
  this.setVisible(true);
    
 }
 
 public static void main(String[] args) {
  L5_7 Kk = new L5_7();
 }
}
第十三周作业第二题