Copyright © 2004 Christopher M Butler This work is licensed under a Creative Commons License.
Eleritec Docking Framework Tutorial
Keeping Things Simple Compounding the Issue
A Simple Dockable Demo
The simplest docking case involves, appropriately enough, a simple Dockable instance. In this case, explicitly implementing the Dockable interface is not necessary. A plain old AWT Component will do. The only requirement is to register the Component as dockable via DockingManager.registerDockable() and have a DockingPort present into which the Component may be docked.

This is referred to as a simple case because the dockable component itself is looked upon as a single entity. In order to detect a docking operation, some component must be listening for the start of a drag. While the DockingManager is responsible for managing listeners internally, it needs to know which Component will be the drag initiator, versus which Component will actually be the dockable component. In the simple case, the dockable component itself is both the drag initiator and the dockable component. Once registered with the DockingManager, the Component will respond to any drag operations as attempts to initiate docking.

SimpleDemo.java demonstrates the simple case by registering several JPanels of various colors with the DockingManager. This automatically makes the panels docking-enabled (the DockingManager keeps track of Dockable instances representing these panels internally), allowing the user to drag and dock panels in and out of any DockingPort on the screen.
Keeping Things Simple Compounding the Issue