Box box1=Box.createHorizontalBox();
box1.add(new JLabel("车牌号:",JLabel.CENTER));
box1.add(车牌号);
Box box2=Box.createHorizontalBox();
box2.add(new JLabel("车主XX:",JLabel.CENTER));
box2.add(XX);
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 box5=Box.createHorizontalBox();
box5.add(new JLabel("购车公司:",JLabel.CENTER));
box5.add(购车公司);
Box box6=Box.createHorizontalBox();
box6.add(new JLabel("购车时间:",JLabel.CENTER));
box6.add(购车时间);
Box boxH=Box.createVerticalBox();
boxH.add(box1);
boxH.add(box2);
boxH.add(box3);
boxH.add(box4);
boxH.add(box5);
boxH.add(box6);
boxH.add(Box.createVerticalGlue());
JPanel picPanel=new JPanel();
picPanel.setBackground(Color.green);
picPanel.add(new JLabel("选择照片:",JLabel.CENTER));
picPanel.add(选择照片);
JPanel putButton=new JPanel();
putButton.add(录入);
putButton.add(重置);
JPanel messPanel=new JPanel();
messPanel.add(boxH);
messPanel.setBackground(Color.cyan);
putButton.setBackground(Color.red);
setLayout(newBorderLayout());
JSplitPane splitV=new JSplitPane(JSplitPane.VERTICAL_SPLIT,picPanel,pic);
JSplitPane splitH=new JSplitPane(JSplitPane.HORIZONTAL_SPLIT,messPanel,splitV);
add(splitH,BorderLayout.CENTER);
add(putButton,BorderLayout.SOUTH);
validate();
评论0
最新资源