GUIKIT PACKAGE TUTORIAL

GUIKit Example: Hello World

Code
In[3]:=
Click for copyable input
In[2]:=
Click for copyable input

Example

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

In[4]:=
Click for copyable input
Optional Additional Forms Achieving the Same Result

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

Here you choose to pass arguments to the constructor of the label widget instead of setting the property.

In[5]:=
Click for copyable input

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

In[6]:=
Click for copyable input

You could add extra layout options to center the text.

In[7]:=
Click for copyable input

The and widget controls simply wrap the Java Swing controls, which you can also call directly through either the or versions.

In[8]:=
Click for copyable input
In[8]:=
Click for copyable input

Here we also try this using an XML definition equivalent.

In[9]:=
Click for copyable input
New to Mathematica? Find your learning path »
Have a question? Ask support »