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

📄 fallingsnow.java

📁 书籍"Java_面向事件编程"的附带光盘代码
💻 JAVA
字号:
import java.awt.Image;import objectdraw.DrawingCanvas;import objectdraw.VisibleImage;// FallingSnow class modified to extend FallingObjectpublic class FallingSnow extends FallingObject {        // initialize the instance variables and start the active object    public FallingSnow(                       DrawingCanvas canvas,                       Image aSnowPic,                       double x,                       double aSpeed,                       int aScreenHeight) {        // first, call the constructor of the FallingObject class        super(aScreenHeight, aSpeed);                // create our snowflake, but use the instance variable given in        // the FallingObject instead        object = new VisibleImage(aSnowPic, 0, 0, canvas);        object.move(x, -object.getHeight());                start();    }}

⌨️ 快捷键说明

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