skip to main | skip to sidebar

Páginas

  • Página principal
  • iniciando

domingo, 26 de mayo de 2013

inicio

Publicado por Luis Alejandro Zamora Diaz en 16:02 No hay comentarios:
Entradas más recientes Inicio
Suscribirse a: Comentarios (Atom)

colombianodesquisiado

Fecha

Roloj

import java.util.Date; import java.util.GregorianCalendar; import java.util.Calendar; import java.text.SimpleDateFormat; public class Reloj extends javax.swing.JApplet { /** Constructor Reloj */ public Reloj() { initComponents (); } /** Metodo llamado dentro del Constructor */ private void initComponents () { // Instancia de Timer / Auxiliar para Reloj tmrSegundos = new com.osmosislatina.reloj.Timer (); jlblTiempoActual = new javax.swing.JLabel (); // Clase Interna de TimerListener / Auxiliar para Reloj tmrSegundos.addTimerListener (new com.osmosislatina.reloj.TimerListener () { public void onTime (java.awt.event.ActionEvent evt) { tmrSegundosOnTime (evt); } } ); jlblTiempoActual.setText ("00:00:00"); jlblTiempoActual.setHorizontalAlignment (javax.swing.SwingConstants.CENTER); jlblTiempoActual.setFont (new java.awt.Font ("Serif", 1, 30)); getContentPane().add (jlblTiempoActual, java.awt.BorderLayout.CENTER); } private void tmrSegundosOnTime (java.awt.event.ActionEvent evt) { gCal.add(Calendar.SECOND,1); String timeTxt = formatter.format(gCal.getTime()); if (jlblTiempoActual != null) jlblTiempoActual.setText(timeTxt); }

Seguidores

Archivo del blog

  • ▼  2013 (1)
    • ▼  mayo (1)
      • inicio

Datos personales

Luis Alejandro Zamora Diaz
Ver todo mi perfil
 

autoplay