Wolfram ResearchPRODUCTSPURCHASEFOR USERSCOMPANYOUR SITES

Documentation  / Solutions  / GUIKit  / Advanced Topics  /

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 the underlying JavaObjects that make up the runtime interface.

In[1]:=

In[2]:=

Out[2]=

Here is what this interface will display as on a typical platform.

In[3]:=

Out[3]=

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.

In[4]:=

Out[4]=

In[5]:=

Here is an update to what the user interface will look like now.

In[6]:=

Out[6]=

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.

In[7]:=

Out[7]=

In[8]:=

Here is an update to what the user interface will look like now.

In[9]:=

Out[9]=



Any questions about topics on this page? Click here to get an individual response.Buy NowMore Information


 © 2009 Wolfram Research, Inc.  Terms of Use  Privacy Policy |
Sign up for our newsletter: