Class FrameView
java.lang.Object
org.jdesktop.application.AbstractBean
org.jdesktop.application.View
org.jdesktop.application.FrameView
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class View
getApplication, getComponent, getContext, getMenuBar, getResourceMap, getStatusBar, getToolBar, getToolBars, setComponent, setMenuBar, setStatusBar, setToolBar, setToolBars
-
Constructor Details
-
FrameView
-
-
Method Details
-
getFrame
Return the JFrame used to show this ViewThis method may be called at any time; the JFrame is created lazily and cached. For example:
@Override protected void startup() { getFrame().setJMenuBar(createMenuBar()); show(createMainPanel()); }- Returns:
- this application's main frame
-
setFrame
Sets the JFrame use to show this ViewThis method should be called from the startup method by a subclass that wants to construct and initialize the main frame itself. Most applications can rely on the fact that {code getFrame} lazily constructs the main frame and initializes the
frameproperty.If the main frame property was already initialized, either implicitly through a call to
getFrameor by explicitly calling this method, an IllegalStateException is thrown. Ifframeis null, an IllegalArgumentException is thrown.This property is bound.
- Parameters:
frame- the new value of the frame property- See Also:
-
getRootPane
Description copied from class:ViewTheJRootPanefor this View. All of the components for this View must be added to its rootPane. Most applications will do so by setting the View'scomponent,menuBar,toolBar, andstatusBarproperties.- Overrides:
getRootPanein classView- Returns:
- The
rootPanefor this View - See Also:
-