import java.awt.event.*;
import java.awt.*;

/*  Memo.java 
* A simple stand-alone graphical application  - in 1.1  */

public class Memo extends Frame {

 public String message;

 public Memo(String s) {
	super("Memo Frame");	
	         // set our title
	message = s;
	setSize (300, 300);
			}

 public Memo() {
	this("This is a Memo");		
          // constructor is done in previous method    
		}

 public void paint(Graphics g) {
     g.drawString(message, 50, 50);
     g.drawString("Click anywhere to Exit", 50, 70);
			}

 public void start ( ) {
     setVisible(true); 
     this.addMouseListener(new MouseAdapter() {
         public void mousePressed(MouseEvent e){
                setVisible(false); 
                  //hide() the window	   
                dispose();  	   
                  // free up system resources
                System.exit(0);   }});   
  // Quit the app. 
			}
// Use MouseAdaptor so don't have to do all of the 
// MouseListener Interface			

 public static void main(String args[]) {
     Memo m;
		
     if (args.length > 0)  
	    m = new Memo(args[0]); 
     else   m = new Memo(); 

     m.start( );
 } 
} 

