 import java.awt.*;
 import javax.swing.*;

public class Orologio extends JApplet {
    
  Display disegno;
  int lunghezza, larghezza;
  Color  ore [];
  int x,y,r;

 public void init(){
   disegno = new Display();
   setContentPane(disegno);
   ore = new Color[12];
   ore[0] = Color.yellow;
   ore[11] = new Color(.5f,1.f,0.f);
   ore[10] = Color.green;
   ore[9] = new Color(0.f,.5f,.5f);
   ore[8] = Color.blue;
   ore[7] = new Color(0.5f,0.f,1.f);
   ore[6] = Color.magenta;
   ore[5] = new Color(1.f,0.f,0.5f);
   ore[4] = Color.red;
   ore[3] = new Color(1.f,.25f,0.f);
   ore[2] = Color.orange;
   ore[1] = new Color(1.f,.75f,0.f);   
   x = 10;y=10; r=100;
   }
class Display extends JPanel {
   public void paintComponent(Graphics g){
       super.paintComponent(g);
       lunghezza = getSize().width;
       larghezza = getSize().height;
       for ( int i=0; i < ore.length; i++) {
          g.setColor(ore[i]);
          g.fillArc(x,y,2*r,2*r,(i*30)+75,30);
       }
          
       
} 
}
  
}
