![]()
|
![]()
This is a simple example of a stand-alone windowed application; when started, it displays a 'frame window' in the middle of the desktop and fills it with a spectrum of colors. This example assumes that Java 1.1 is available. Here's the source, as a plain ASCII file. To run the program, create or copy the 'Spectrum.nrx' file (note the first letter is a capital letter), and then enter the commands: java COM.ibm.netrexx.process.NetRexxC Spectrum java SpectrumIf you are using OS/2 or Windows, or other systems where a NetRexxC command is provided, you can use the single command netrexxc -run Spectrumto do this. This command would:
If you would like to try it without compiling it first, here's the class file. Download this by clicking on the link, then change to the directory where you placed the class file and then run java Spectrum Note that you must use the capital letter in this case, as the java command is case-sensitive; also, the Java runtime (e.g., from the Java 1.1.2 or later Development Kit) must be installed on your computer for this to run. For a more sophisticated application, with a menu bar, multiple threads, and so on, see the Pinger example. |