Search This Blog

Friday, November 19, 2010

Express yourself with emoticons in Applet

import javax.swing.*;
import java.awt.*;

public class Emoticon extends JApplet
/*<applet code="Emoticon.class" height=250 width=250>
  JLabel lbl;

public void paint(Graphics g)
       // g.fillOval(20,40,40,40); //For Round Left Eye
       // g.fillOval(160,40,40,40);//For Round Right Eye
        g.fillOval(40,40,60,40);   //For Oval Left Eye
        g.fillOval(120,40,60,40);  //For Oval Right Eye
        g.setFont(new Font("Helvetica", Font.BOLD, 18));
        g.drawString("Welcome to My Blog!",10,230);



Post a Comment