public static void removeTrayIcon(){
  if (tray != null && trayIcon != null)   tray.remove(trayIcon);
}

public static void removeTrayIcon ( ) { if ( tray != null && trayIcon != null ) tray . remove ( trayIcon ) ; }
remove the system tray icon
