The examples in this section are designed to show the use of the Super Widget Package in a more realistic context. Each example can be thought of as a simple GUI program in its own right, or as a template on which you can construct more elaborate code. Some examples require additional files – such as images – and in these cases the link is given to a ZIP file containing everything necessary. All the files contained in the ZIP should be placed in the same directory.

If you decide to develop one of these examples, you should probably build it into a package. I have deliberately left everything in Global` context to keep the code simple and easy to experiment with.

Example 1 - Graph fitting

This is a slightly more sophisticated version of the graph fitting example that was used to explain SuperWidgetGraphicsPanel. You can add and delete points, change the type of function used for the fit, read/write data to a file, etc. Source

Example 2 - Navigating a notebook

This program builds a tree out of the heading structure of a notebook and lets the user navigate the notebook. It is also possible to switch notebooks. Source

Example 3 - Navigating Java classes

Although this application is only of direct interest to J/Link programmers, it illustrates an exciting technique for creating good-looking GUI applications. The program displays some HTML which is read from a file before extra information is added. It is controlled entirely from HTML buttons (constructed using GIF files), which trigger the various actions. Because HTML is so easy to write, and can also link with the web, this may be the most effective way to implement many applications. Note that it is easy to create GIF or JPEG files from Mathematica using Export – although this flexibility was not required in this particular example. ZIP of source and associated files

Example 4 - Embedding LiveGraphics3D

This application shows you how to embed a LiveGraphics3D applet inside a GUI using the SuperWidgetLiveGraphics3D super widget. The image can be rotated or set spinning in the traditional way using the mouse, or by operating the controls. You need to understand a bit of (simple) J/Link for this example because calls to J/Link are used to manipulate the applet. You don't need to know J/Link if you only want to display an object using LiveGraphics3D without manipulating it from your program. Source

Example 5 - Sending text over the internet

This example uses a text editor super widget to prepare text which is then sent back to my site across the internet. Not only does this demonstrate a number of valuable features of the SWP, I also hope I will obtain some useful feedback from you regarding the SWP! Source

Example 6 - Electronic circuit drawing

This illustrates the use of Graphics\[Breve]Regions to create drag and drop components that can be manoevered by the user to make a simple electronic circuit. The code could form the basis for a variety of applications in which complex data structures are to be assembled visually. Source

Example 7 - Contributed example

This is an example contributed by Christopher Klausmeier of the Kellogg Biological Station, Michigan State University. It is a good example of how to achieve a pleasing layout. Source