
import java.awt.*;
import java.applet.Applet;
import java.lang.System;

public class JVMTest extends Applet { 

    public void start() {
	this.setLayout( new BorderLayout() );

	String version = System.getProperty("java.specification.version");
	if (version.equals("1.0") || version.equals("1.1")) {
	    java.lang.System.out.println(version);
	    this.warn();
	}
	else {
	    this.ok();
	}
    }

    // Display a warning that the Java VM is too old.
    public void warn() {
	this.add("North", 
		  new Label("Your JVM doesn't support Java 1.2.  Please go to:"));
	this.add("Center", 
		  new Label("http://java.sun.com/products/plugin/index.html"));

	this.add("South", 
		  new Label("and download the Java plug-in."));

    }

    // Display a notice that the Java VM should be all right.
    public void ok() {
	this.add("North", 
		  new Label("Your JVM seems to support Java 1.2."));
	this.add("Center", 
		  new Label("You should be able to run the remote microscope."));
    }

    public void stop() {
    }

    public void destroy() {
    }
  
}
