A manufacturer specializing in plastic products

The system tray

by:Qusheng     2020-11-11
java。 awt。 SystemTray represents the system tray on the table. By calling the SystemTray static method. getSystemTray ( ) To access the system tray. And then, before this method is called, the SystemTray should use the static methods. isSupported ( ) To test whether the system tray can be supported. If the operating system on the system tray is not ready or not supported, then the method
isSupported ( ) Returns false. At this point, the application if you try to call methods getSystemTray ( ) Java, then will throw an exception. 朗。 UnsupportedOperationException
every Java application has a single SystemTray instance. Therefore, an application should not create its own SystemTray instance, but should by calling the method getSystemTray ( ) To obtain the currently available in the system tray.
the system tray contains one or more of the tray icon, the icon is calls the method add ( java。 awt。 TrayIcon) Add, when don't need these ICONS, by calling the method to remove ( java。 awt。 TrayIcon) To weed out.
note: Mustang new code library, points out that if the JAVA runtime environment, or operating system to find can't added to the system tray icon, method add ( ) Throws a AWTException anomalies. For example, in the X-ray WINDOWS desktop environment, if there is no
the system tray, then AWTException exception will be thrown.
Custom message
Chat Online 编辑模式下无法使用
Chat Online inputting...