if (tree != null && lastPath != null)
if (lastPath != null && tPath != null && tPath.equals(lastPath)) {
  public void actionPerformed(ActionEvent e)  {    if (tree != null && lastPath != null)        tree.startEditingAtPath(lastPath);  }