About SimpleFrontEnd and the MathSessionPane Class

 

SimpleFrontEnd is a small but useful application that provides a “front end” to the Mathematica kernel. It is provided mainly to demonstrate the capabilities of J/Link’s MathSessionPane class. SimpleFrontEnd is little more than a frame and menu bar that host a MathSessionPane. Essentially all the features you see are built into MathSessionPane, including the keyboard commands and the properties settable via the Options menu.

 

To run this example, go to the SimpleFrontEnd directory and execute the following command line:

 

( Windows )

java -classpath SimpleFrontEnd.jar;..\..\..\JLink.jar SimpleFrontEnd

 

( Linux, UNIX, Mac OSX )

java -classpath SimpleFrontEnd.jar:../../../JLink.jar SimpleFrontEnd

 

 

MathSessionPane is a visual component that provides a scrolling In/Out session interface to the Mathematica kernel. Much more sophisticated than the kernel's own "terminal" interface, it provides features such as full text editing of input including copy/paste and unlimited undo/redo, support for graphics, control of fonts and styles, customizable syntax coloring, and bracket matching.

 

The following key commands are supported by MathSessionPane itself:

 

Shift-Enter

Evaluate Input

Ctrl-X

Cut

Ctrl-C

Copy

Ctrl-V

Paste

Ctrl-Z

Undo

Ctrl-Y

Redo

Ctrl-L

Copy Input From Above

Ctrl-B

Balance Brackets

Alt-.

Abort Computation

Alt-,

Interrupt Computation

 

(These all use the Command key on the Macintosh)

 

Although MathSessionPane provides rich text-editing facilities, you cannot go back and edit previous inputs or re-evaluate them in place. You can only edit the current input.