Hi everybody,
First, i want to excuse my english because i'm a french guy. Thank you
I want to generate multiple JPanel inside a single JPanel. I try with a for loop, but this method don't give me any succes.
The situation is...... i recieve an ID between 1 to unlimited and depending this ID i want to generate a JPanel with a Jtable inside
Ex. ID=3 -> 3 JPanel
ID=8 -> 8 JPanel
i hope i'm clear with my poor english
here is a sample of my code
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();
Thanks a lot guys