?? systemtraydemo.java
字號:
package onlyfun.caterpillar;
import java.awt.*;
public class SystemTrayDemo {
public static void main(String[] args) {
if(SystemTray.isSupported()) {
SystemTray tray = SystemTray.getSystemTray();
Image image = Toolkit.getDefaultToolkit()
.getImage("musical_note_smile.gif");
TrayIcon trayIcon = new TrayIcon(image, "JNotePad 1.0");
try {
tray.add(trayIcon);
} catch (AWTException e) {
System.err.println("無法加入系統(tǒng)工具欄圖標(biāo)");
e.printStackTrace();
}
} else {
System.err.println("無法取得系統(tǒng)工具欄");
}
}
}
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -