import	java.applet.Applet;
import	java.awt.*;
import	java.util.*;
import	java.net.*;
import	java.io.*;
import	java.util.Enumeration;
import	java.util.Properties;

public class PrintSystemProperties extends java.applet.Applet {
		Image		buf;
		Graphics	gBuf;

		TextArea	tr;
		String		str = "";
		InputStream	is;
		DataInputStream	ds;

	public void init() {
		Dimension d = size();
		buf  = createImage( d.width, d.height );  
		gBuf = buf.getGraphics(); 
		str = getSystemPropertiesString();
		setBackground( Color.lightGray );
		setLayout( null );

//		tr = new TextArea( 80, 20 );
		tr = new TextArea( d.width, d.height );
		add( tr );
//		tr.reshape( 0, 0, d.width, d.height );
		tr.setText( str );
	}

    public void destroy() { gBuf.dispose(); } 

    public void update( Graphics g ){
    	paint( g );
    }
    
    public void paint( Graphics g ) {
      g.drawImage( buf, 0, 0, this );          
    }

	public String getSystemPropertiesString() {
		String str="";
		Properties p = System.getProperties();
		Enumeration e = p.propertyNames();
		while( e.hasMoreElements() ){
			String key = e.nextElement().toString();
			str += key + " = " + p.getProperty( key ) + "\n";
		}
		return str;
	}
}

