if (text != null && !text.equals("")) editFile.renameTo(new File(text));
if (text != null && text != "" && !text.equals(fc.getName(editFile))) if (editFile.renameTo (fc.getFileSystemView().createFileObject (fc.getCurrentDirectory(), text))) rescanCurrentDirectory(fc);
    private void completeEditing()    {      if (editField != null)        {          String text = editField.getText();          if (text != null && !text.equals(""))            editFile.renameTo(new File(text));          list.remove(editField);          list.revalidate();          list.repaint();        }    }