j'ai toujours la même chose
1 2 3 4 5 6 7 8 9
| this.Y_POSITION=25;
// incrementation, in order not to have a panel over an other
// 'cause this method is summoned in a loop clause
JPanel pane = new JPanel();
pane.setBackground(Color.WHITE);
pane.setBorder(new LineBorder(Color.BLACK,1) );
pane.setPreferredSize(new Dimension(100,50));
this.add(pane, BorderLayout.CENTER);
System.out.println(pane); |
me donne
javax.swing.JPanel[,0,0,0x0,invalid,layout=java.awt.FlowLayout,alignmentX=0.0,alignmentY=0.0,border=javax.swing.border.LineBorder@4f80d6,flags=9,maximumSize=,minimumSize=,preferredSize=java.awt.Dimension[width=100,height=50]]
Partager