Using Internal Frame Dialogs with JDesktopPane

Here’s a simple example that shows how this works. It also shows how you can make sure your container fills the desktop, even if the desktop changes size (since there’s no layout manager, this won’t happen automatically).
// DialogDesktop.java
//
import javax.swing.*;
import java.awt.event.*;
import java.awt.*;
// A frame that can easily support internal frame dialogs
public class DialogDesktop extends JFrame [...]

Browse the Archive