}
    private void editFile(int index)    {      list.ensureIndexIsVisible(index);      editFile = (File) list.getModel().getElementAt(index);      if (editFile.canWrite())        {          Rectangle bounds = list.getCellBounds(index, index);          Icon icon = getFileView(fc).getIcon(editFile);          editField = new JTextField(editFile.getName());          // FIXME: add action listener for typing          // FIXME: painting for textfield is messed up when typing              list.add(editField);          editField.requestFocus();          editField.selectAll();                    if (icon != null)            bounds.x += icon.getIconWidth() + 4;          editField.setBounds(bounds);        }      else        {          editField = null;          editFile = null;          lastSelected = null;    }  }