第三十五次发博不知道用什么标题好

 1 package Test;
 2 import java.awt.*;
 3 import javax.swing.*;
 4 
 5 public class QInghong    extends JFrame {
 6     JFrame f = new JFrame("窗口");
 7     JPanel p = new JPanel();
 8     JLabel l = new JLabel("账号:");
 9     JLabel l1 = new JLabel("密码:");
10     JTextField tf = new JTextField(10);
11     JPasswordField  ps = new JPasswordField (10);
12     JButton b1 = new JButton("登录");
13     JButton b2 = new JButton("取消");
14     
15     
16     public QInghong() {
17     f.setVisible(true);
18     f.add(p);
19     p.add(l);
20     p.add(tf);
21     f.setBounds(500, 400, 500, 400);
22     p.add(l1);
23     p.add(ps);
24     p.setBackground(new Color(177,156,23));
25     p.add(b1);
26     p.add(b2);
27     }
28 
29     public static void main(String[] args) {
30         // TODO Auto-generated method stub
31         new QInghong();
32     }
33 
34 }

忙得晕头转向的一天....熬夜不是好习惯嗯

posted @ 2019-05-20 20:16  18软工8班段诗媛  阅读(98)  评论(0编辑  收藏  举报