if (description != null && description.length() != 0) setPropertyOfNode(hostTree, "Description", description);
if (description != null && description.trim().length() != 0) setPropertyOfNode(hostTree, "Description", description.trim());
  public void setNodeDescription() {    boolean askedUser = false;    String description = "";    if (getSelectedNodesInHostTree() != null) {      description = getPropertyOfNode(hostTree, "Description");      description =        (String)JOptionPane.showInputDialog(this,                                            "Enter Node Description",                                            "Node Description",                                            JOptionPane.QUESTION_MESSAGE,                                            null, null, description);      askedUser = true;      if (description != null && description.length() != 0)        setPropertyOfNode(hostTree, "Description", description);    }    if (getSelectedNodesInNodeTree() != null) {      if (!askedUser) {        description = getPropertyOfNode(nodeTree, "Description");        description =          (String)JOptionPane.showInputDialog(this,                                              "Enter Node Description",                                              "Node Description",                                              JOptionPane.QUESTION_MESSAGE,                                              null, null, description);      }      if (description != null && description.length() != 0)        setPropertyOfNode(nodeTree, "Description", description);    }  }