JLayeredPane and JDesktopPane
JLayeredPane and JDesktopPane both provide a component Z-order, allowing components to overlap each other when needed. In contrast to JLayeredPane , JDesktopPane additionally has an instance of DesktopManager which provides window management for internal frames (allowing you to develop multi-document applications).
Both JLayeredPane and JDesktopPane have a null LayoutManager , this means, child components are not arranged in a layout but each component is displayed within its own bounds (a Rectangle object specifying the components location and display size).
Working with null -layouts can be difficult but RADi provides some mechanisms to ease this task:
Working with null layouts To place a component inside a null -layout, drag it to the JLayeredPane or JDesktopPane . The component's location will be the location where the mouse button was released and the component's size will be its preferred size.
If you paste one or more components into a null -layout, the components' location will be at (10/10, 20/20, ...) and the components' sizes will be their preferred sizes.
Components can be moved with the mouse or by using the arrow keys. To change a component's size, adjust the box which is drawn around a single selected component. You can also set a component's location and size numerically.
| ||||||||||||||||||||||
See also: Inernal Frames and Palettes Mover | ||||||||||||||||||||||