Main
Home
Quick tour
Documentation
Mailing Lists
Demonstration
Download
Sourceforge project
FAQ
History
Links


Toolboxes
Char
Control
Crypto
Finance
FunFun
General
Graphics
Image
Internal
InputOutput
LinearAlgebra
Matrix
Miscellaneous
Net
Polynomial
Set
Signal
SpecFun
SpecialMatrix
Statistics
String
System
Time
Trigonometric
...


Contact
Developers

JMathLib
A Java Clone of Octave, SciLab, Freemat and Matlab.

[Index] [Documentation] [Demonstration] [Download]

Chapter 17. Embedding JMathLib in a java applet

The following is an example on how to use JMathLib as a java applet. The basic java applet is called using the class MathLib.UI.Applet.MathLibGUI.class.

The following code is an example for usage in mozilla.

<applet               CODE = "MathLib.UI.Applet.MathLibGUI.class"
 CODEBASE = "Classes" ARCHIVE  = "JMathLibSmallApplet.jar"
 WIDTH    = "700"     HEIGHT = "400"
 ALIGN    = "middle"
 VSPACE   = "0"         HSPACE = "0"     >
<PARAM NAME="startup"   VALUE = "plot(rand(2,30))">
<PARAM NAME="fgcolor"   VALUE = "ff00ff">
<PARAM NAME="bgcolor"   VALUE = "f64033">
</applet>

There are some parameters in order to configure the applet.

Use the parameter startup to specify the first command which should be executed after the JMathLib applet has been started. (e.g. <PARAM NAME="startup" VALUE="plot(rand(2,30))"> will plot a figure with two rows of random numbers.)

Use the parameter fgcolor to specify the forground color (basically the color of the letters) in JMathLib's workspace. The color is coded as rgb-values, please use hex-notation (e.g. 2200ff).

Use the parameter bgcolor to specify the background color in JMathLib's workspace. The color is coded as rgb-values, please use hex-notation (e.g. 2200ff).

Last modified
SourceForge Logo