import java.awt.*; import java.applet.*; import java.util.*; public class Hodiny extends Applet implements Runnable{ Image b; String[] str = new String[6]; int[] cis = new int[6]; Thread bezi; int pom1, pom2; Image buffer; Graphics bufferg; Image[] pole = new Image[10]; int[] cisla = new int[6]; int y = 159; public void start() { if (bezi == null) { bezi = new Thread (this); bezi.start(); } } public void stop() { if (bezi != null) { bezi.stop(); bezi = null; } } public void run() { while(true) { try { repaint(); bezi.sleep(1000); } catch (Exception e) { } } } public void init() { cisla[0] = 244; cisla[1] = 261; cisla[2] = 281; cisla[3] = 298; cisla[4] = 318; cisla[5] = 335; resize(610, 390); b = getImage(getDocumentBase(), "projekty/hodiny.gif"); buffer = createImage(getSize().width, getSize().height); bufferg = buffer.getGraphics(); for(int i = 0; i<=9; i++) { pole[i] = getImage(getDocumentBase(), "projekty/" + stringuj(Integer.toBinaryString(i)) + ".gif"); } } public void rozdel(int p) { pom1 = p / 10; pom2 = p % 10; } public String stringuj(String s) { int pom = 4-s.length(); for(int i = 0; i