正在加载图片...
Java. aw套件 ·系统工具栏图标的支持 if(SystemTray isSupported())t SystemTray tray SystemTray. getSystemTray ()i Image image Toolkit get DefaultToolkit() getimage("musical note smile. gif") PopupMenu popup new PopupMenu( MenuItem item new MenuItem("fEJNotePad 1.0") popup. add(item)i Trayicon trayicon new TrayIcon(image,"JNotePad 1.0", popup) try tray. add(trayicon)i s catch (AWTException e) i System.err, print1n("无法加入系统工具栏图标"); eprintstackTrace() y else i System.err, println("无法取得系统工具栏 開啓 JNotePad10 ③tmny,《哪曲下午0301java.awt套件 • 系统工具栏图标的支持 if(SystemTray.isSupported()) { SystemTray tray = SystemTray.getSystemTray(); Image image = Toolkit.getDefaultToolkit() .getImage("musical_note_smile.gif"); PopupMenu popup = new PopupMenu(); MenuItem item = new MenuItem("开启JNotePad 1.0"); popup.add(item); TrayIcon trayIcon = new TrayIcon(image, "JNotePad 1.0", popup); try { tray.add(trayIcon); } catch (AWTException e) { System.err.println("无法加入系统工具栏图标"); e.printStackTrace(); } } else { System.err.println("无法取得系统工具栏"); }
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有