JDesktopPane in Java Swing

Home  »  Java  »  Advance Java  »  Java Swing II  »  JDesktopPane


Many of today's desktop applications use a multiple-document interface (MDI)-a main window containing other windows-to manage several open documents. Java's JDesktopPane and JInternalFrame classes for implementing multiple-document interfaces. The tutorial is intended for students and professionals who are familiar with basic Java GUI and event handling techniques.

With the JInternalFrame class you can display a JFrame-like window within another window. Usually, you add internal frames to a desktop pane. The desktop pane, in turn, might be used as the content pane of a JFrame. The desktop pane is an instance of JDesktopPane, which is a subclass of JLayeredPane that has added API for managing multiple overlapping internal frames.

You should consider carefully whether to base your program's GUI around frames or internal frames. Switching from internal frames to frames or vice versa is not necessarily a simple task. By experimenting with both frames and internal frames, you can get an idea of the tradeoffs involved in choosing one over the other.



C:\>jdk1.4\bin>javac JDesktopPaneDemo.java
C:\>jdk1.4\bin>java JDesktopPaneDemo



"Output of JDesktopPaneDemo.class"


Download Complete Program

  -  



Java Swing-II


JOptionPane Class Input Dialog Boxes JSliders
JProgressBars JTables JTabbedPane
JMenu JPopupMenu JToolBar
JFileChooser JScrollBar JScrollPane
JRootPane JTextPane JTree
JSplitPane JDesktopPane JEditorPane




1 comment: