el("姓名:",JLabel.CENTER));Р box2.add(姓名);Р Box box3=Box.createHorizontalBox(); Р box3.add(new JLabel("性别:",JLabel.CENTER));Р box3.add(男);Р box3.add(女);Р Box box4=Box.createHorizontalBox(); Р box4.add(new JLabel("部门:",JLabel.CENTER));Р box4.add(部门);Р Box box6=Box.createHorizontalBox();Р box6.add(new JLabel(" ",JLabel.CENTER));Р Box box5=Box.createHorizontalBox(); Р box5.add(new JLabel("工资:",JLabel.CENTER));Р box5.add(工资);Р Box boxH=Box.createVerticalBox(); Р boxH.add(box1);Р boxH.add(box2);Р boxH.add(box3);Р boxH.add(box5);Р boxH.add(box6);Р boxH.add(box4);Р boxH.add(Box.createVerticalGlue()); Р JPanel pCenter=new JPanel();Р pCenter.add(boxH);Р pCenter.setBackground(Color.yellow);Р setLayout(new BorderLayout());Р add(pCenter,BorderLayout.CENTER);Р JPanel pSouth=new JPanel();Р pSouth.add(录入);