Access to the Java Object Layer
The
GUIKit framework provides
Mathematica functions, such as
PropertyValue[{"widgetName", "propertyName"}] for accessing state, or calling methods on
JavaObject instances using
InvokeMethod[{"widgetName", "methodName"}, arguments]. However, this does not prevent you from using the standard
J/Link techniques for manipulating any underlying
JavaObject that make up the runtime interface.
| Out[56]= |  |
Here is what this interface will display as on a typical platform.
| Out[57]= |  |
The first argument of a
GUIObject is the root window Java class, in this case a
javax.swing.JFrame instance, and we can make method calls on this component while the interface is running.
| Out[4]= |  |
Here is an update to what the user interface will look like now. (The interface has been resized to display the entire title.)
| Out[59]= |  |
Utility
GUIKit functions, such as
WidgetReference[], which looks up specially registered instances, also returns
JavaObject instances, and so any object in the interface can be accessed directly with
J/Link method calls.
| Out[60]= |  |
Here is an update to what the user interface will look like now.
| Out[62]= |  |