//johnsjava.webs.com import javax.swing.*; import java.awt.*; public class MyApplet extends JApplet { public void init() { } public void paint(Graphics g) { boolean blinking = false; while(true) { g.setColor(Color.WHITE); g.fillRect(0,0,100,100); g.setColor(Color.YELLOW); // x y width,height g.fillOval(10,10,80, 80); g.setColor(Color.BLACK); if(!blinking) { g.fillOval(50-15-5, 25, 10, 15); g.fillOval(50+15-5, 25, 10, 15); } g.fillArc(50-20, 50+10, 40, 20, 180, 180); blinking = !blinking; try{Thread.sleep(500);}catch(Exception ex){} } } }