in the below code, i created a GridLayot with 3 rows and 3 columns, what i want to do is,,to add jpanel_1 into a specifc cell of the Gridlayout, lets say in the grid cell number (2,3).
Code:
private void setUpGUI2() {
// TODO Auto-generated method stub
jFrame_2 = new JFrame("Border Demo");
GridLayout gridLayOut = new GridLayout(3,3);
jFrame_2.setLayout(gridLayOut);
jPanel_1 = new JPanel(new BorderLayout());
jPanel_2 = new JPanel(new BorderLayout());
jPanel_1.setBorder(BorderFactory.createTitledBorder("title"));
//jPanel_1.setBounds(30, 100, 110, 300);
jPanel_1.add(jLabel_Hello, BorderLayout.EAST);
jPanel_2.setBorder(BorderFactory.createLoweredBevelBorder());
//jPanel_2.setBounds(20, 50, 120, 80);
jPanel_2.add(jLabel_Hello, BorderLayout.SOUTH);
//jFrame_2.setBounds(0, 0, 600, 600);
jFrame_2.add(jPanel_1);//how to add jpanel_1 to a specific cell of Gridlayout defined above
//jPanel_1.add(jPanel_2);
jFrame_2.add(jPanel_2);
jFrame_2.pack();
jFrame_2.setVisible(true);
}