Java Swing Tutorials - Herong's Tutorial Examples
∟Creating Internal Frames inside the Main Frame
∟javax.swing.JInternalFame - Internal Frame Class
This section describes javax.swing.JInternalFame - Internal Frame Class, representing a UI internal frame inside a regular frame.
javax.swing.JInternalFrame - A Swing class representing a UI internal frame inside
a regular frame. An internal frame supports almost all the features a regular
frame does. Adding an internal frame to a regular frame should be done by adding
the internal frame to a desktop pane first, then using the desktop pane as the content
pane of the regular frame. Interesting methods of JInternalFrame include:
- JInternalFrame(String) - Constructor to create an internal frame with the
specified string as the frame title.
- setResizable(boolean) - Method to set this frame to be resizable or not.
- setClosable(boolean) - Method to set this frame to be closable or not.
- setMaximizable(boolean) - Method to set this frame to be maximizable or not.
- setIconifiable(boolean) - Method to set this frame to be iconifiable or not.
- setSize(int, int) - Method to set the size of this frame. If not set, an internal
frame will have zero size and not visible.
- setVisible(boolean) - Method to set this frame to be visible or not. The default
setting is not visible, you must call setVisible(true) to show an internal frame.
- addInternalFrameListener(InternalFrameListener) - Method to add internal frame
listeners to this internal frame.
javax.swing.JDesktopPane - A Swing class representing a container to host internal
frames.
- getSelectedFrame() - Method to return the selected internal frame.
javax.swing.event.InternalFrameListener - A Swing interface for the implementing class
to handle internal frame events. Methods include:
- internalFrameActivated(InternalFrameEvent) - Method to be called when the internal
frame is activated.
- internalFrameClosed(InternalFrameEvent) - Method to be called when the internal
frame has been closed.
- internalFrameClosing(InternalFrameEvent) - Method to be called when the internal
frame is in the process of being closed.
- internalFrameDeactivated(InternalFrameEvent) - Method to be called when the internal
frame is de-activated.
- internalFrameDeiconified(InternalFrameEvent) - Method to be called when the internal
frame is de-iconified.
- internalFrameIconified(InternalFrameEvent) - Method to be called when the internal
frame is iconified.
- internalFrameOpened(InternalFrameEvent) - Method to be called when the internal
frame is opened.
Table of Contents
About This Book
JDK (Java Development Kit)
Introduction of Java Swing Package
Graphics Environment of the Local System
JFrame - Main Frame Class
JLabel - Swing Label Class
JButton - Swing Button Class
JCheckBox - Swing Check Box Class
JRadioButton - Swing Radio Button Class
JTextField - Swing Text Field Class
JComboBox - Swing Combo Box Class
Menu Bar, Menus, Menu Items and Listeners
►Creating Internal Frames inside the Main Frame
►javax.swing.JInternalFame - Internal Frame Class
JInternalFameTest.java - Internal Frame Class Test
javax.swing.InternalFrameListener - Internal Frame Listener Interface
Layout of Components in a Container
LookAndFeel and UIManager
Option Dialog Boxes
JEditorPane - The Editor Pane Class
SwingWorker - The Background Task Worker
AWT (Abstract Windows Toolkit)
Integration with Desktop System
Archived Tutorials
References
Full Version in PDF/EPUB