|The NetRexx Tablet applet|
This is an example of a Java navigation applet, which has been written
in NetRexx; when in use, it looks something
These tabs can be used to give a 'horizontally organized' feel to a web
Here's the NetRexx source, as a plain ASCII file. The compiled .class file is roughly the same size as the .gif 'banner' image at the top of this page.
You can also download the Tablet package (with the .class file already compiled from the source) in zip format [tablet.zip, 14kB]. The Tablet package is also included in the NetRexx package you may prefer to download the whole package, including the other NetRexx samples and examples.
Please note that the Tablet package is part of the NetRexx package, and is covered by the terms in the IBM License Agreement for that package.
To have the applet displayed in a World Wide Web (HTML) page, you need to
<applet code="Tablet.class" width=100% height=40> <param name=tab1 value="News nrnews.html"> <param name=tab2 value="Documentation nrdocs.html"> <param name=show value="2"> </applet>Here,
<applet code="Tablet.class" width=100% height=15> <param name=show value="0"> </applet>Note that the height in the applet tag should be 15 in this case.
You can then view the HTML file that includes the applet tags with any Java-enabled browser.
If you do not have a Java-enabled browser, you can view the applet using the 'applet viewer' that comes with the Java Development Kit. To do this, change to the directory containing the World Wide Web (HTML) page that contains the reference to the applet, and issue the command
applet testapp.htmwhere 'testapp.htm' is the name of the page. This should start up the applet viewer, showing a window for each applet referenced from the page. [Note: the applet viewer may be called 'appletviewer' on some systems; also, you may need to change the '100%' in the width setting to a fixed number such as '500'.]
If you do not see the applet in the window, or the window does not appear, close the viewer (if necessary) and see if there are any messages in the applet viewer's 'weblog' file. This may be found in the 'applet' or 'weblogs' subdirectory which you should find in the Java home directory (e.g., d:\java, depending on where you installed Java).
Warning: the applet viewer takes a URL (e.g., http://etc...) or a plain file name. If you want to give it the name of a file that needs a path, prefix the file specification with 'file:/'. For example:
applet file:/d:\fred\myapplet.htmThe format of the file specification will vary from platform to platform.
To compile the applet, ensure the 'Tablet.nrx' file (note the first letter is a capital letter) is in your current directory, and then enter the command:
java COM.ibm.netrexx.process.NetRexxC Tablet