KGRKJGETMRETU895U-589TY5MIGM5JGB5SDFESFREWTGR54TY
Server : Apache/2.4.62
System : FreeBSD fbsdweb2.web.rcn.net 14.1-RELEASE FreeBSD 14.1-RELEASE releng/14.1-n267679-10e31f0946d8 GENERIC amd64
User : www ( 80)
PHP Version : 8.3.8
Disable Function : NONE
Directory :  /domains/lavish.interport/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /domains/lavish.interport/Clock.java
/* print the date */

import java.awt.Graphics;
import java.awt.Font;
import java.util.Date;
import java.awt.Color;
import java.awt.Component;

public class Clock extends java.applet.Applet 
  implements Runnable {

  Font theFont = new Font("TimesRoman",Font.BOLD,24);
  Date theDate;
  Thread runner;

  public void start() {
    if (runner == null); {
      runner = new Thread(this);
      runner.start();
    }
  }

  public void stop() {
    if (runner != null) {
      runner.stop();
      runner = null;
    }
  }
  
  public void run() {
    while (true) {
      theDate = new Date();
      repaint();
      try { Thread.sleep(1000); }
      catch (InterruptedException e) { }
    }
  }

  public void paint(Graphics g) {
    g.setFont(theFont);
    setBackground(Color.black);
    g.setColor(Color.white);
    g.drawString(theDate.toString(),2,18);
  }
}





Anon7 - 2021