Articles Projects Tips Downloads Contacts About

Dockable windows container project.

The project is an attempt to implement dockable container with inner panels which can be moved out and docked back to main continer. The implementation is GridBaglayout based. When panel is moved in/out GridbagConstraints of all exsting components added to container are recalculated and all the components are relayouted.

Original view of dockable window demo.

Originally all panels are added to container. One of them is a simple panel (all surface of the panel is active). It means the panel is draggable by any point. All the rest panels imitate frames. They have header area to be dragged and a cross button to close the panel. Closed panel is removed from container.

A panel is draggged out of base continer.

A frame was dragged from base continer. Remaining panels fill the space available after removing.

A panel is docked to a new place of container.

The frame was dragged back to container and dropped on top/left panel (east side) in base container. The panel was docked back beside drop target panel.

An additional feature is the drgged out frames remember position of main container and automatically moved together with base container window.

The source code is included in the .jar file (See src directory).

Click Downloads to get dockable container demo application.