tags:

views:

39

answers:

1

I want a main window with several child widgets and i want the child widget to be shown in the main frame at the same time and they can coordinate with each other to layout through the main window area. When i double click the child widget it can pop-up and when double click again it can embed back. I have done this in QT by QDockWidget before and I've learned that the JavaDocking Framework can achive this, but i want to know whether it can be done just by SWing framwork?

Thanks in advance

+1  A: 

If you're asking for full featured docking, you should probably edit your question title to reflect that.

Docking is pretty complicated as it involves dynamic layout, drag-n-drop, and many other things. You could roll your own, essentially with nested JSplitPane and JTabbedPane and a lot of time.

Besides JavaDocking, consider the open source (MIT licensed) FlexDock, or the commercial JIDE Docking.

Geoffrey Zheng
Thanks for your help! What i want to do now is just to pop-up a window and make it embedded back into the main window. Could you please give some direct guidelines? I'm sorry if this question is naive. As for the featured docking, it's not with high priority now and i want to go deep into it later.
Xu DXn
Please edit your question to explain exactly what you mean by "embed it back", and how you want user to do it (click a button?). Obviously you can't put a `JDialog` inside a `JWindow`.
Geoffrey Zheng
Thanks for your comments. i've edited my question. By"embed it back" i mean when the user double click it can embed it back to the main window frame.
Xu DXn
Do you mean that when you double-click on a widget, it is "maximized" to take up all the space in the window, and then double-click again it's restored to previous size, as in Eclipse? Most docking frameworks can do that, or if that's the only thing you'll ever want, it's not hard to remove the other widgets when a widget is maximized, and add them back when it's restored.
Geoffrey Zheng