⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 animatingsurface.java~1~

📁 风机在线监测系统,采用sqlserver数据库,有问题联系我
💻 JAVA~1~
字号:
package java2d;import java.awt.*;/** * Demos that animate extend this class. */public abstract class AnimatingSurface extends Surface implements Runnable 	{    public Thread thread;    public abstract void step(int w, int h);    public abstract void reset(int newwidth, int newheight);    public void start() {        if (thread == null) {            thread = new Thread(this);            thread.setPriority(Thread.MIN_PRIORITY);            thread.setName(name + " Demo");            thread.start();        }    }    public synchronized void stop() {        if (thread != null) {            thread.interrupt();        }        thread = null;		max=(float)0.0;        notifyAll();    }    public void run() {        Thread me = Thread.currentThread();        while (thread == me && !isShowing() || getSize().width == 0) {            try {                thread.sleep(500);            } catch (InterruptedException e) { }        }        while (thread == me) {            repaint();            try {                thread.sleep(500);            } catch (InterruptedException e) { }        }        thread = null;    }		}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -