gpt4 book ai didi

java - jdk 1.5 的系统托盘

转载 作者:行者123 更新时间:2023-11-29 08:19:50 25 4
gpt4 key购买 nike

我正在将代码从 jdk 1.6 转换为 jdk 1.5,代码是:

import java.awt.SystemTray;

public static void main(String[] args) {
if (SystemTray.isSupported()) {
SystemTray tray = SystemTray.getSystemTray();
}

try {
tray.add(trayIcon);
} catch (AWTException e) {
System.err.println("TrayIcon could not be added.");
}
}

你们能告诉我什么是兼容代码吗?

最佳答案

你可以试试其中的任何一个

JDIC (JDesktop Integration Components)

JTray

关于java - jdk 1.5 的系统托盘,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1011184/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com