Java Clock Tutorial

preview_player
Показать описание
A Not exactly simple video on how to make a clock in eclipse. It was in halves because I'd made it before, but I needed it with me. So I had 2 eclipse windows open.

public class Simple_Clock extends Applet implements Runnable {
Thread t, t1;
public void start() {
t = new Thread (this);
}

public void run (){
while(t1 == t){
repaint();
try{
}
catch(InterruptedException e) {}
}
}
public void paint(Graphics g) {
Calendar cal = new GregorianCalendar();
}
}
//It Works :D
Рекомендации по теме
Комментарии
Автор

i have created an applet class, but the program demands that a main class is to be called... :(

chaysemcmillan