DesktopPane
is a container for internal frames with the ability to manage multiple overlapping internal frames.
The general concept is commonly known as MDI (Multiple Document Interface). The InternalFrame
class displays a
Frame/Stage-like window on the desktop pane within another window and acts just like a regular Frame
.
The demo can be downloaded from the link below.
InternalFrame iFrame = new InternalFrame("Frame A", createTabPane(), 400, 300);
String url = getClass().getResource("/resources/icon.png").toExternalForm();
iFrame.getIcons().add(new Image(url));
//set position
iFrame.relocate(300, 200);
//select and move to front
iFrame.setSelected(true);
DesktopPane desktopPane = new DesktopPane();
desktopPane.getChildren().add(iFrame);