Java tutorial
import javax.swing.JDesktopPane; import javax.swing.JFrame; import javax.swing.JOptionPane; public class MainClass extends JFrame { public MainClass(String title) { super(title); setDefaultCloseOperation(EXIT_ON_CLOSE); final JDesktopPane desk = new JDesktopPane(); setContentPane(desk); JOptionPane.showInternalConfirmDialog(desk, "Is this OK?"); } // A simple test program public static void main(String[] args) { MainClass td = new MainClass("Desktop"); td.setSize(350, 250); td.setVisible(true); } }