private void addIcon(){
  if (!iconAdded && tray != null) {
    try {
      tray.add(trayIcon);
      iconAdded=true;
    }
 catch (    AWTException ex) {
      LOGGER.warning("Error adding tray icon: " + ex.getLocalizedMessage());
    }
  }
}

private void addIcon ( ) { if ( ! iconAdded && tray != null ) { try { tray . add ( trayIcon ) ; iconAdded = true ; } catch ( AWTException ex ) { LOGGER . warning ( "Error adding tray icon: " + ex . getLocalizedMessage ( ) ) ; } } }
adds the tray icon if the tray is available and the icon isn ' t already added .
