java.awt.Window

java.awt.Window is the superclass for both Frame and Dialog and provides a good deal of functionality for both of its extensions. Table 16-2 lists the public methods provided by java.awt.Window (we've omitted some overridden Component methods, such as addNotify()).

Table 16-2. java.awt.Window Public Methods
Method Description
void pack() Sets the size of the window to the minimum size that will display all contained components
void show() Makes the window visible. If the window is already visible, it is brought to the front of all other windows.
boolean isShowing() Returns true if the window is showing; false otherwise
void dispose() Hides the window and disposes of the platform-dependent resources used by the window
void toFront() ...

Get Graphic Java™ 1.2, Volume I: AWT, Third Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.