if(log.isDebugEnabled()) {
if(log.isErrorEnabled()) {
  public void update(Observable o, Object arg) {    if (o instanceof NamedFrame) {      NamedFrame namedFrame = (NamedFrame) o;      NamedFrame.Event event = (NamedFrame.Event) arg;      if (event.eventType == NamedFrame.Event.ADDED) {        JMenuItem menuItem = new JMenuItem(event.title);        titleToMenuItem.put(event.title, menuItem);        menuItem.addActionListener(this);        windowMenu.add(menuItem);      } else if (event.eventType == NamedFrame.Event.REMOVED) {        JMenuItem menuItem = (JMenuItem) titleToMenuItem.get(event.title);        if (menuItem == null) {          if(log.isDebugEnabled()) {            log.error("CSMARTUL: No window menu item for " + event.title);          }        } else {          windowMenu.remove(menuItem);          titleToMenuItem.remove(event.title);        }      } else if (event.eventType == NamedFrame.Event.CHANGED) {	JMenuItem menuItem = (JMenuItem)titleToMenuItem.get(event.prevTitle);        if (menuItem == null) {          if(log.isDebugEnabled()) {            log.error("CSMARTUL: No window menu item for " + event.title);          }        } else {          windowMenu.remove(menuItem);          titleToMenuItem.remove(event.prevTitle);	  JMenuItem newMenuItem = new JMenuItem(event.title);	  titleToMenuItem.put(event.title, newMenuItem);	  newMenuItem.addActionListener(this);	  windowMenu.add(newMenuItem);	}      }    }  }