photo.java

来自「初期JAVA学习非常有用的资料。帮助深入了解API。特别是Applet。」· Java 代码 · 共 29 行

JAVA
29
字号
import javax.swing.ImageIcon;public class Photo {    public String filename;    public String caption;    public int width;    public int height;    public ImageIcon icon;    public Photo(String filename, String caption, int w, int h) {        this.filename = filename;        if (caption == null)            this.caption = filename;        else            this.caption = caption;        width = w;        height = h;        icon = null;    }    public void setIcon(ImageIcon i) {        icon = i;    }    public ImageIcon getIcon() {        return icon;    }}

⌨️ 快捷键说明

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