import java.applet.Applet;
import java.awt.*;
import java.awt.event.*;

/**	http://charts.unicode.org/ Miscellaneous Symbols has the smiley face characters
* 	which are Unicode 263A and 263B 
*	see the pdf file at http://charts.unicode.org/PDF/U2600.pdf
*/
public class SmileyFace extends Applet{

		
	public static void main(String args[]) {
		SmileyFace  smileyface  = new SmileyFace();
		//Create a new window.
        	Frame f = new Frame("SmileyFaceExample Application");
		f.addWindowListener(new WindowAdapter() {
            public void windowClosing(WindowEvent e) {System.exit(0);}});
       	//Add the Example instance to the window and display the window.
       	f.add(smileyface);
		TextArea messagebox = new TextArea();
		Font myfont = new Font("MS Sans Serif",Font.PLAIN,12);
		messagebox.setFont(myfont);
		f.add(messagebox);
        	f.pack();        //Resizes the window to its natural size.
		Cursor handcursor = new Cursor(Cursor.HAND_CURSOR);
		f.setCursor(handcursor);
		f.setVisible(true);

		Character smileyfacecharacter1 = new Character((char)9786);
		Character smileyfacecharacter2 = new Character((char)9887);
		String smileyfacestring = smileyfacecharacter1.toString() + smileyfacecharacter2.toString() ;
		messagebox.append(smileyfacestring + "\n");
		System.out.println(smileyfacestring);
		if (myfont.canDisplay((char)9786)) {
			messagebox.append("This text area can display smileyface character Unicode 9886" + "\n");
		}else{
			messagebox.append("This text area can not display smileyface character Unicode 9886" + "\n");
		}
		if (myfont.canDisplay((char)9887)) {
			messagebox.append("This text area can display smileyface character Unicode 9887"+ "\n");
		}else{
			messagebox.append("This text area can not display smileyface character Unicode 9887"+ "\n");
		}

	
	
	}
}

