this.beep = this.getAudioClip(this.getDocumentBase(), "sounds/beep.au"); if (this.beep != null) { Thread t = new Thread(this); t.start(); }
Thread.currentThread().setPriority(Thread.MIN_PRIORITY); while (true) { if (!stopped) this.beep.play(); try { Thread.sleep(5000); } catch (InterruptedException e) { } }
this.stopped = false;
this.stopped = true;