Here is Full Code To Create a Digital through JAVA Applet
import java.awt.*;
import java.awt.Graphics;
import java.applet.Applet;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Date;
public class DGClock extends Applet {
DateFormat dateFormat;
Date date;
Thread t;
public void init() {
this.setSize(300,200);
}
public void paint(Graphics g)
{
try
{
Font f=new Font("Arial",Font.BOLD,50);
g.setFont(f);
g.setColor(Color.DARK_GRAY);
dateFormat = new SimpleDateFormat("hh:mm:ss a");
date = new Date();
g.drawString(dateFormat.format(date),5,100);
Font f1=new Font("Arial",Font.BOLD,10);
g.setFont(f1);
g.drawString("For More Example Visit : exceptionthroow.blogspot.in",20,170);
g.drawString("Email : agotariyanilesh@gmail.com",65,185);
showStatus("Developed By : Nilesh Agotariya");
t.sleep(1000);
repaint();
}catch(Exception e)
{
}
}
}