Hi I'm able to add TrayIcon to the SystemTray and can remove the same form SystemTray.
How to remove an existing TrayIcon. I could not get the Object to available TrayIcons to do it.
Below is my code to add and remove TrayIcon
TrayIcon trayIcon = new TrayIcon(icon);
SystemTray tray = SystemTray.getSystemTray();
PopupMenu popup = new PopupMenu();
MenuItem exit = new MenuItem("Exit");
popup.add(exit);
trayIcon.setToolTip("My TrayIcon");
trayIcon.setPopupMenu(popup);
tray.add(trayIcon);
trayIcon.displayMessage("Testing",
"Information" ,
TrayIcon.MessageType.INFO );
tray.remove(trayIcon);