cpp のプログラムによって 1 秒間に 10 回オーバーセーブされたイメージが Apache サーバー上にあります。このアニメーションのような画像をウェブサイトに表示したいと考えています。このスクリプトを書き、netbeans のアプレット ビューアーで動作するようにしましたが、Web サイトにクラスを配置すると、画像が表示され、変更されません。私はこれに多くの時間を費やしましたが、うまくいきません。誰でも私を助けることができますか?
public class poprawki extends Applet implements Runnable {
    Thread thread1;
    boolean running = true;
    BufferedImage obraz = null;
    public void paint(Graphics g)     {
        g.drawImage(obraz, 10, 10, null);
    }
    public void wyswietlanie_obrazu() {
        try {
            obraz =ImageIO.read(new URL("http://localhost/obraz.jpg"));
            repaint();
        } catch (IOException e) {
        }
    }
    public void init() {
        setLayout(null);
        thread1 = new Thread(this);
        thread1.start();
        repaint();
    }
    public void destroy() {
        running = false;
        thread1 = null;
    }
    public void run() {
        while (running) {
            try {
                wyswietlanie_obrazu();
                Thread.sleep(100);
            } catch (InterruptedException e) {
                System.out.println(e);
            }
        }
    }
}