dcsimg
adding a JInternalFrame to the glass pane
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Effi_Olivkovich
Posted On:   Wednesday, April 10, 2002 05:52 AM

I'm adding a JInternalFrame to the glass pane. I can control the size of the JInternalFrame using setPreferedSize(), but I can not control the location in which the frame is located. I tried using setBounds() before adding the frame to the glass pane, I tryed using setLocation(), but non of these methods places the frame where I want it to be. why do I get this problem? What needs to done in order to have control over the location of the JInternalFrame.

-Thanks.

Re: adding a JInternalFrame to the glass pane

Posted By:   Paul_Connaughton  
Posted On:   Wednesday, April 10, 2002 07:11 AM


I think it is probably because the GlassPane is using a layout, the default layout of a GlassPane is a FlowLayout(because it is normally a JPanel). Anyway the solution is:


((Container)getRootPane().getGlassPane()).setLayout( null );

About | Sitemap | Contact