}
    public void propertyChange(PropertyChangeEvent e)    {      JFileChooser filechooser = getFileChooser();            String n = e.getPropertyName();      if (n.equals(JFileChooser.MULTI_SELECTION_ENABLED_CHANGED_PROPERTY))        {          if (filechooser.isMultiSelectionEnabled())            fileList.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION);          else            fileList.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);        }      else if (n.equals(JFileChooser.SELECTED_FILE_CHANGED_PROPERTY))        {          File file = filechooser.getSelectedFile();          if (file == null)            setFileName(null);          else            setFileName(file.getName());          int index = -1;          index = getModel().indexOf(file);          if (index >= 0)            {              fileList.setSelectedIndex(index);              fileList.ensureIndexIsVisible(index);              fileList.revalidate();              fileList.repaint();            }        }            else if (n.equals(JFileChooser.DIRECTORY_CHANGED_PROPERTY))        {          fileList.clearSelection();          fileList.revalidate();          fileList.repaint();          setDirectorySelected(false);          File currentDirectory = filechooser.getCurrentDirectory();          setDirectory(currentDirectory);          boolean hasParent = (currentDirectory.getParentFile() != null);          getChangeToParentDirectoryAction().setEnabled(hasParent);        }            else if (n.equals(JFileChooser.CHOOSABLE_FILE_FILTER_CHANGED_PROPERTY))        {          filterModel.propertyChange(e);        }      else if (n.equals(JFileChooser.FILE_FILTER_CHANGED_PROPERTY))        {          filterModel.propertyChange(e);        }      else if (n.equals(JFileChooser.DIALOG_TYPE_CHANGED_PROPERTY)                 || n.equals(JFileChooser.DIALOG_TITLE_CHANGED_PROPERTY))        {          Window owner = SwingUtilities.windowForComponent(filechooser);          if (owner instanceof JDialog)            ((JDialog) owner).setTitle(getDialogTitle(filechooser));          approveButton.setText(getApproveButtonText(filechooser));          approveButton.setToolTipText(                  getApproveButtonToolTipText(filechooser));          approveButton.setMnemonic(getApproveButtonMnemonic(filechooser));        }            else if (n.equals(JFileChooser.APPROVE_BUTTON_TEXT_CHANGED_PROPERTY))        approveButton.setText(getApproveButtonText(filechooser));            else if (n.equals(              JFileChooser.APPROVE_BUTTON_TOOL_TIP_TEXT_CHANGED_PROPERTY))        approveButton.setToolTipText(getApproveButtonToolTipText(filechooser));            else if (n.equals(JFileChooser.APPROVE_BUTTON_MNEMONIC_CHANGED_PROPERTY))        approveButton.setMnemonic(getApproveButtonMnemonic(filechooser));      else if (n.equals(              JFileChooser.CONTROL_BUTTONS_ARE_SHOWN_CHANGED_PROPERTY))        {          if (filechooser.getControlButtonsAreShown())            {              topPanel.add(controls, BorderLayout.EAST);            }          else            topPanel.remove(controls);          topPanel.revalidate();          topPanel.repaint();          topPanel.doLayout();        }            else if (n.equals(              JFileChooser.ACCEPT_ALL_FILE_FILTER_USED_CHANGED_PROPERTY))        {          if (filechooser.isAcceptAllFileFilterUsed())            filechooser.addChoosableFileFilter(                    getAcceptAllFileFilter(filechooser));          else            filechooser.removeChoosableFileFilter(                    getAcceptAllFileFilter(filechooser));        }            else if (n.equals(JFileChooser.ACCESSORY_CHANGED_PROPERTY))        {          JComponent old = (JComponent) e.getOldValue();          if (old != null)            getAccessoryPanel().remove(old);          JComponent newval = (JComponent) e.getNewValue();          if (newval != null)            getAccessoryPanel().add(newval);        }            if (n.equals(JFileChooser.DIRECTORY_CHANGED_PROPERTY)          || n.equals(JFileChooser.FILE_FILTER_CHANGED_PROPERTY)          || n.equals(JFileChooser.FILE_HIDING_CHANGED_PROPERTY))        rescanCurrentDirectory(filechooser);            filechooser.revalidate();      filechooser.repaint();    }