1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
|
for(int dev = 0; dev < nbrDevice; dev++){
GeneralContent = new JPanel();
GeneralContent.setName();
GeneralContent.setLayout(new BorderLayout());
deviceInfoContent = new JPanel();
deviceInfoContent.setLayout(new FlowLayout());
JLabel lblDevice = new JLabel();
JLabel lblDeviceName = new JLabel();
lblDevice.setText("some text");
lblDeviceName.setText("some text");
deviceInfoContent.add(lblDevice);
deviceInfoContent.add(lblDeviceName);
GeneralContent.add(deviceInfoContent,BorderLayout.NORTH);
GeneralContent.revalidate();
GeneralContent.add(_table, BorderLayout.CENTER);
GeneralContent.revalidate();
//This paenl is my principal container
_panel.add(GeneralContent);
_panel.revalidate();
} |
Partager