1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
|
Container contenu = getContentPane();
GridBagLayout g = new GridBagLayout();
contenu.setLayout(g);
GridBagConstraints c = new GridBagConstraints();
Plab = new JPanel();
lab=new JLabel("00:00:00");
lab.setEnabled(true);
lab.setOpaque(true);
lab.setLocation(0,50);
Plab.setMinimumSize(new Dimension(60,20));
Plab.setMaximumSize(new Dimension(60,80));
Plab.setPreferredSize(new Dimension(60,61));
Plab.setOpaque(true);
Plab.add(lab);
c.anchor=GridBagConstraints.SOUTH;
c.gridx=1;
c.gridy=1;
c.gridheight=1;
c.gridwidth=3;
c.weightx=c.weighty=1;
contenu.add(Plab,c); |