[java] MDI Form 2
test test
Ever since the advent of Microsoft Windows 3.0 and the X Windows UNIX environment, the MDI (Multiple Document Interface) model has been the predominant format for organizing and presenting information in windows-style environments. Open almost any currently available Windows application (such as Word, Access, or Excel), and you’ll find that it’s an MDI application. Many X Windows and Motif applications are also MDI programs.
In a nutshell, MDI is a graphical user interface (GUI) mechanism that makes it possible to arrange multiple child windows inside a parent window. (An alternative user-interface model, called SDI — or single-document interface — lets an application display only one main window at a time).
In an MDI environment, child windows are totally contained a their parent window – in effect, the parent window becomes a new desktop within which the children operate. When you minimize a child window, it is iconified at the bottom of the parent window. When you move a child window, it is clipped by the boundaries of the parent window. And when you minimize a parent window, only one entry appears in the window list maintained by your window manager.
In pre-Swing versions of the Advanced Windowing Toolkit (AWT), there was no way to build MDI applications. You could create multiple Frame objects, but each Frame was a top-level window, and was completely independent. You couldcreate a MDI-like application that created a Frame for each window, but then the user’s screen quickly got cluttered — and if the user wanted to minimize the entire application to work on something else, the user had to minimize each Frame. Forthermore, each individual Frame created an icon on the desktop when it was minimized. Things got messy pretty quickly.
Swing eliminates all these problems by simply supporting the MDI user interface. Finally, Swing allows Java developers to create real MDI applications by providing a class named JInternalFrame. In Swing, JInternalFrame objects are child windows held inside a special container called a JDesktopPane. And a JDesktopPane object can turn any container, like a JFrame or JApplet, into a parent window.






