posted 21 years ago
The code is as follows :-
JPanel panel1 = new JPanel();
panel1.setVisible(true);
panel1.setBackground(Color.red);
JDesktopPane desk = new JDesktopPane();
desk.setBackground(Color.blue);
JInternalFrame frame = new JInternalFrame();
frame.setBounds(0,0,100,100);
frame.setVisible(true);
frame.show();
JInternalFrame frame1 = new JInternalFrame();
desk.add(frame1);
frame1.setLayer(new Integer(2));
frame1.setBounds(0,0,150,150);
frame1.setVisible(true);
frame1.show();
desk.add(frame);
desk.setVisible(true);
panel1.add(desk);
panel1.setVisible(true);
panel1.invalidate();
getContentPane().add(panel1);
///
When i ask for the desktopPane to return all the frames by the getAllFrames() i get the number of InternalFrames added to the desktopPane.But they are not visible.
Mitesh