public class SingleFrameExample4 extends SingleFrameApplication
This example only defines two @Actions explicitly: open and close. The open action allows the user to choose a file and load it into the textPane, and close just replaces the textPane's contents with the value of the "defaultText" resource. The example inherits
Application.ExitListener
Constructor | Description |
---|---|
SingleFrameExample4() |
Modifier and Type | Method | Description |
---|---|---|
void |
close() |
Replace the contents of the textPane with the value of the
"defaultText" resource.
|
static void |
main(java.lang.String[] args) |
|
void |
open() |
Load the specified file into the textPane or popup an error
dialog if something goes wrong.
|
protected void |
startup() |
Responsible for starting the application; for creating and showing
the initial GUI.
|
addPropertyChangeListener, addPropertyChangeListener, firePropertyChange, firePropertyChange, getPropertyChangeListeners, removePropertyChangeListener, removePropertyChangeListener
addExitListener, end, exit, exit, getContext, getExitListeners, getInstance, getInstance, hide, initialize, launch, quit, ready, removeExitListener
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
configureWindow, getMainFrame, getMainView, setMainFrame, show, show, show, show, shutdown
@Action public void open()
@Action public void close()
protected void startup()
Application
This method is called by the static launch
method,
subclasses must override it. It runs on the event dispatching
thread.
startup
in class Application
Application.launch(java.lang.Class<T>, java.lang.String[])
,
Application.initialize(java.lang.String[])
,
Application.shutdown()
public static void main(java.lang.String[] args)