该楼层疑似违规已被系统折叠 隐藏此楼查看此楼
package data1;
import java.awt.BorderLayout;
public class hy extends JFrame {
private JPanel table;private JTextField name;private JTextField age;
/** * Launch the application. */public static void main(String[] args) {EventQueue.invokeLater(new Runnable() {public void run() {try {hy frame = new hy();frame.setVisible(true);} catch (Exception e) {e.printStackTrace();}}});}
/** * Create the frame. */public hy() {setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);setBounds(100, 100, 450, 300);table = new JPanel();table.setBackground(Color.CYAN);table.setBorder(new EmptyBorder(5, 5, 5, 5));setContentPane(table);table.setLayout(null);JLabel hy_name = new JLabel("\u59D3\u540D");hy_name.setBounds(49, 38, 54, 15);table.add(hy_name);JLabel hy_age = new JLabel("\u5E74\u9F84");hy_age.setBounds(49, 76, 54, 15);table.add(hy_age);JLabel hy_sex = new JLabel("\u6027\u522B");hy_sex.setBounds(49, 111, 54, 15);table.add(hy_sex);JLabel hy_hobby = new JLabel("\u7231\u597D");hy_hobby.setBounds(49, 149, 54, 15);table.add(hy_hobby);name = new JTextField();name.setBounds(113, 35, 106, 21);table.add(name);name.setColumns(10);age = new JTextField();age.setBounds(113, 73, 106, 21);table.add(age);age.setColumns(10);JRadioButton sexman = new JRadioButton("\u7537");sexman.setToolTipText("");sexman.setBounds(109, 107, 45, 23);table.add(sexman);JRadioButton sexwoman = new JRadioButton("\u5973");sexwoman.setToolTipText("");sexwoman.setBounds(170, 107, 45, 23);table.add(sexwoman);JCheckBox q = new JCheckBox("\u65C5\u6E38");q.setBounds(109, 145, 54, 23);table.add(q);JCheckBox w = new JCheckBox("\u97F3\u4E50");w.setBounds(170, 145, 49, 23);table.add(w);JCheckBox e = new JCheckBox("\u8D2D\u7269");e.setBounds(235, 145, 49, 23);table.add(e);JCheckBox r = new JCheckBox("\u6237\u5916");r.setBounds(297, 145, 49, 23);table.add(r);JCheckBox t = new JCheckBox("\u4EA4\u53CB");t.setBounds(356, 145, 49, 23);table.add(t);JLabel label = new JLabel("\u8BF7\u5B8C\u5584\u60A8\u7684\u4FE1\u606F\uFF0C\u5E76\u5B8C\u6210\u63D0\u4EA4\u3002");label.setBounds(49, 188, 217, 15);table.add(label);JButton submit = new JButton("\u63D0\u4EA4");submit.setBounds(113, 221, 95, 25);table.add(submit);JButton delete = new JButton("\u6E05\u9664");delete.setBounds(235, 221, 95, 25);table.add(delete);}
}