/*
 * BodingtonCompatibilityApplet.java
 *
 * Created on 01 May 2002, 15:14
 */

import java.applet.*;
import java.awt.*;
/**
 *
 * @author  bmb6jrm
 */
public class BodingtonCompatibilityApplet extends java.applet.Applet {

    /** Initializes the applet BodingtonCompatibilityApplet */
    public void init() {
        initComponentsAlt();
	    
	String java_version = System.getProperty( "java.version" );
	String java_vendor = System.getProperty( "java.vendor"	);
    /*
     * WebLearn (modification) [24/01/05] Alexis O'Connor <crimson>. 
     * By removing the dependancy on crimson, the JVM merely has to be 
     * version 1.4+ and contain an XMLReader implementation (which Sun, 
     * Blackdown and IBM all do!).
     */ 
	if ( "1.4".compareTo(java_version.trim()) > 0)
	    {
	    textArea1.setText( "Bodington java applets on this web site require Java version 1.4+ " +
	    "but this web browser is using version " + java_version + " from " + java_vendor + "." );
	    return;
	    }
	// <<<--- WebLearn modification.
    textArea1.setText( "Your web browser software has suitable support for the Bodington " +
    "java applets.  Java version " + java_version + " from " + java_vendor + "." );
    return;
    }

    private void initComponentsAlt()
    {
	label1 = new java.awt.Label();
	textArea1 = new java.awt.TextArea( "Starting to test Java compatibility...", 80, 10, TextArea.SCROLLBARS_NONE );
	
	setLayout(new java.awt.BorderLayout(0, 10));
	
	setBackground(new java.awt.Color(126, 107, 140));
	label1.setAlignment(java.awt.Label.CENTER);
	label1.setBackground(new java.awt.Color(104, 94, 120));
	label1.setFont(new java.awt.Font("SansSerif", 1, 14));
	label1.setForeground(new java.awt.Color(255, 153, 0));
	label1.setText("Bodington Java Compatibility Test");
	add(label1, java.awt.BorderLayout.NORTH);
	
	textArea1.setText("The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. ");
	textArea1.setColumns(80);
	textArea1.setEditable(false);
	textArea1.setRows(10);
	add(textArea1, java.awt.BorderLayout.CENTER);
	
    }

    /** This method is called from within the init() method to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    private void initComponents()//GEN-BEGIN:initComponents
    {
	label1 = new java.awt.Label();
	textArea1 = new java.awt.TextArea();
	
	setLayout(new java.awt.BorderLayout(0, 10));
	
	setBackground(new java.awt.Color(126, 107, 140));
	label1.setAlignment(java.awt.Label.CENTER);
	label1.setBackground(new java.awt.Color(104, 94, 120));
	label1.setFont(new java.awt.Font("SansSerif", 1, 14));
	label1.setForeground(new java.awt.Color(255, 153, 0));
	label1.setText("Bodington Java Compatibility Test");
	add(label1, java.awt.BorderLayout.NORTH);
	
	textArea1.setText("The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. ");
	textArea1.setColumns(80);
	textArea1.setEditable(false);
	textArea1.setRows(10);
	add(textArea1, java.awt.BorderLayout.CENTER);
	
    }//GEN-END:initComponents


    // Variables declaration - do not modify//GEN-BEGIN:variables
    private java.awt.Label label1;
    private java.awt.TextArea textArea1;
    // End of variables declaration//GEN-END:variables

}
