Copyright (c) SEMM NL All rights reserved.
Author : Paul Hamaker. Part of JavaLessons.com
This is about javax.swing.JInternalFrame.
We empower it.
Set its position and size. ( x, y, width, height )
Add a button to its contentpane.
And add it to a JDesktopPane's default layer,...
that we created beforehand.
We create and add a second JInternalFrame to the same (default) layer.
We want it on top of the other one ...
The desktoppane will be this applet's contentpane.
Don't forget, by default they're invisible.
A JDesktopPane extends JLayeredPane, that offers 5 different layers to add components to, to ensure proper overlapping.
Most components go to the bottommost DEFAULT_LAYER .
On top of this is the PALETTE_LAYER for palettes and floating toolbars .
The MODAL_LAYER is for dialogs that lock up the underlying window, modal dialogs .
The POPUP_LAYER for tooltips and the likes.
The topmost DRAG_LAYER is for temporarily adding a component, when dragging it.
moveToBack and moveToFront are for positioning components relative to others WITHIN the SAME LAYER . A component in the Drag layer will always be painted on top of one in the Default Layer, f.e.
========= Not transparent.