Pastebin launched a little side project called VERYVIRAL.com, check it out ;-) Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on Mar 11th, 2012  |  syntax: None  |  size: 0.52 KB  |  views: 22  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
This paste has a previous version, view the difference. Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. import java.applet.Applet;
  2. import java.awt.Graphics;
  3.  
  4. public class OrologioApplet extends Applet implements Runnable{
  5.         public void init(){
  6.                 Thread orologioApplet = new Thread(this);
  7.                 orologioApplet.start();
  8.                 Thread t1 = new Thread(new OrologioPendolo());
  9.                 t1.start();
  10.         }
  11.         paint...
  12.         run...
  13.         public void update(){
  14.                 repaint();
  15.         }
  16. }
  17. public class OrologioPendolo extends OrologioApplet implements Runnable{
  18.         public void run(){
  19.                 while(true){
  20.                         occhi();
  21.                 }
  22.         }
  23.         public void occhi(){
  24.                 ...
  25.                 super.update();
  26.         }
  27. }