//******************************************************************************
// mail2.java:	Applet
//
//******************************************************************************
import java.applet.*;
import java.awt.*;
import java.net.*;
import java.io.*;
import mailbox;

//==============================================================================
// Main Class for applet search
//
//==============================================================================
public class mail2 extends Applet
{
	mailbox maildlg;
	Button idb_mail;
	
	public void init()
	{
		System.out.println("\nMail v2.0 - by Horace Chan\n");
		
		idb_mail = new Button(" Mail ");
		this.setBackground(Color.black);
		this.add("Center",idb_mail);

		maildlg = new mailbox("Mail2 - by Horace Chan");
		maildlg.init();
			   	
		maildlg.pack();

		try maildlg.setparent(this);
		catch (IOException e)
		{
			this.showStatus("Error : Can't not set up socket!");
		}
	}

	public boolean action(Event e, Object arg)
	{
		if (e.target == idb_mail)
		{
			maildlg.show();
			return true;
		}
		else
			return super.action(e, arg);
	}
}



