Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

JInternalFrame 1

Status
Not open for further replies.

seema165

Programmer
Jul 11, 2005
48
GB
Hi,

Let me give you the scenario of what the problem is:

I have a JDesktopPane and a JPanel. I have added both onto a JSplitPane (split HORIZONTAL). The JDesktopPane then has 2 other JPanels (blankPanel and newsPanel) which are added using GridBagLayout, where the top JPanel (blankPanel) takes up 80% of the weight and the bottom JPanel (newsPanel) takes up 20%.

On the left side of my JSplitPane, I have a JPanel which has a JTree on it. When a leaf node is clicked, it brings up a JInternalFrame in my blankPanel. The JInternalFrame is set to be maximised (frame.setMaximised(true)).

When I minimise my JInternalFrame, it minimises it and puts it in the top centre of my blankPanel (this is my first problem). Then When I click it to open it again, it doesn't maximise it (second problem).

Does anyone know if this is fixable or if there's a bug somewhere which cannot be fixed.

You should also know that I am using the system look and feel, which currently is the Windows look and feel. Is this the reason why it doesn't work? Or is it something to do with GridBagLayouts/GridBagConstraints and JInternalFrames and/or JDesktopPanes?

Thanks in adv :)
 
Don't think JDesktopPane is intended to contain normal JPanels. It's designed to host JInternalFrames. If you want JInternalFrames to work in your blankPanel, then make that a JDesktopPane and contain the blankPanel and newsPanel in a regular JPanel.

Tim
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top