Wolfram ResearchPRODUCTSPURCHASEFOR USERSCOMPANYOUR SITES
THIS IS DOCUMENTATION FOR AN OBSOLETE PRODUCT.
SEE THE DOCUMENTATION CENTER FOR THE LATEST INFORMATION.

GUIKit Example:
Hello World

Code

In[1]:=
In[2]:=

Example

This example displays the classic simple "Hello World" application using the GUIKit framework.

In[3]:=

Optional additional forms achieving the same result

The following are other variants on the basic theme of specifying the user interface definition.

Here we choose to pass arguments to the constructor of the label widget instead of setting the "text" property.

In[4]:=

Technically, even this version will work since frame and content panes will be automatically wrapped if not included.

In[5]:=

You could add extra layout options to center the text.

In[6]:=

The "Panel" and "Label" widget controls simply wrap the Java Swing controls, which we can also call directly, either the Swing or AWT versions:

In[7]:=
In[8]:=

Here we also try this using an XML definition equivalent.

In[9]:=


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



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