SimpleDateFormat formatter = new SimpleDateFormat("s" ,Locale.getDefault()); int segundos=Integer.parseInt(formatter.format(date)); formatter.applyPattern("m"); int minutos=Integer.parseInt(formatter.format(date)); formatter.applyPattern("h"); int hora=Integer.parseInt(formatter.format(date));
//el centro del reloj y el radio
int xCentro=getSize().width/2; int yCentro=2*fm.getHeight()+(altoApplet-2*fm.getHeight())/2; int radio=(xCentro>(altoApplet-2*fm.getHeight())/2)?(altoApplet-2*fm.getHeight())/2:xCentro;
//Dibujar la circunferencia, los números y las marcas