g.drawString(time, 100, 100); try { Thread.sleep(1000); } catch (InterruptedException e) { } repaint(); }}