📄 bookentry.java
字号:
package Java.ICQ;// BookEntry.java// A simple aggregate class to store a book's title and icon.//import javax.swing.ImageIcon;public class BookEntry { private final String title; private final String imagePath; private ImageIcon image; public BookEntry(String title, String imagePath) { this.title = title; this.imagePath = imagePath; } public String getTitle() { return title; } public ImageIcon getImage() { if (image == null) { image = new ImageIcon(imagePath); } return image; } // Override standard toString method to give a useful result public String toString() { return title; }}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -