Java test applets
This page provides links to a few test or demo applets. Each one has been checked and can be expected to run using Acorn's !Java.
In each case the applet is supplied in a zip archive. To run the applet, drag a copy of the zip contents to a normal directory, then double-click 'select' on the webpage file (finishes '/html') to load the page and applet. If these run ok, your browser and copy of !Java are working reasonably well!
To load an applet into ‘TechWriter Pro Plus’ drag and drop the webpage file onto the TW page. It will then be loaded at the caret.
The applets are divided into two types. The first set are deliberately simple examples so you can test that !Java (or !Chockcino) runs correctly on your machine. The second set are more demanding. They are intended to show that Java can be used for rather more than the ‘eye candy’ that often appears on web pages!
The simple test applets are:
The more demanding (and useful) examples are:
The above applets also serve as quite nice demos of the kinds of maths / eng / science applets that can now be loaded into ‘TechWriter Plus’ and extend its use for technical work.
- A model of an electronic circuit. [21k] This is the most complex and demanding applet. It provides a set of buttons you can click on to alter the circuit and signal values. The results are then displayed on a 'oscilloscope screen' and some printed values. Note that the green rectangle buttons reset the values to their defaults if you get lost!
- A least squares fit applet. [4.2k] This reads in data from a file and does a least squares fit to a straight line. It then draws the data points and the line on the screen and shows the slope and intercept values for the line. The data is held in the file 'xydata' which should be kept in the same directory as the java applet and webpage. You can edit the contents of 'xydata', resave it, then click on 'replot' to get a new graph. Note that the applet is just a demo, so it is limited to 99 data points and an input file size of less than 4096 bytes.
If you are interested — and are not easily frightened by truly appallingly written code — you can look at the source code for the least squares applet here. Serious programmers, look away now...
BTW If you are interested, the circuit shows the effect of a simple resistor and capacitor as an 'integrator' when we input a square wave. There are more examples like this on the 'Scots Guide' website.
Content and pages maintained by: Jim Lesurf (email@example.com)
using HTMLEdit and Techwriter on a RISCOS machine.
University of St. Andrews, St Andrews, Fife KY16 9SS, Scotland.