1 2 3 4 5 6 7 8 9 10 11 12
|
JPanel surfTotPanel = new JPanelTrans(new SpringLayout());//surfTotPanel et mon panel secondaire
_surfaceTotale = new JLabel("Surface Totale"); //Ici un premier Jlabel
_surfaceTotale2 = new JLabel(); //et ici le Jlabel qui pose problème.
Dimension dimension = new Dimension(10,10);
_surfaceTotale2.setMaximumSize(dimension);
_surfaceTotale2.setMinimumSize(dimension);
_surfaceTotale2.setPreferredSize(dimension);
surfTotPanel.add(_surfaceTotale);
surfTotPanel.add(_surfaceTotale2);
SpringUtilities.makeCompactGrid(surfTotPanel, 1, 2, 0, 0, 0, 0);
rightPanel.add(surfTotPanel, BorderLayout.SOUTH); //J'ajoute le panel secondaire au panel principale. Celui-ci contient déjà un JscrollPane dans son CENTER et à un BORDER (je précise au cas où cela pourrait servir) |