javax.swing.plaf

## Class FileChooserUI

- java.lang.Object
- - javax.swing.plaf.ComponentUI
  - - javax.swing.plaf.FileChooserUI

- Direct Known Subclasses:
    BasicFileChooserUI, MultiFileChooserUI

      public abstract class FileChooserUI
      extends ComponentUI

  Pluggable look and feel interface for `JFileChooser`.

- - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `FileChooserUI()` |

  - ### Method Summary

    All Methods Instance Methods Abstract Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `abstract void` | `ensureFileIsVisible(JFileChooser fc, File f)` |
    `abstract FileFilter` | `getAcceptAllFileFilter(JFileChooser fc)` |
    `abstract String` | `getApproveButtonText(JFileChooser fc)` |
    `JButton` | `getDefaultButton(JFileChooser fc)` | Returns default button for current `LookAndFeel`.
    `abstract String` | `getDialogTitle(JFileChooser fc)` |
    `abstract FileView` | `getFileView(JFileChooser fc)` |
    `abstract void` | `rescanCurrentDirectory(JFileChooser fc)` |

    - ### Methods inherited from class javax.swing.plaf.ComponentUI

      `contains, createUI, getAccessibleChild, getAccessibleChildrenCount, getBaseline, getBaselineResizeBehavior, getMaximumSize, getMinimumSize, getPreferredSize, installUI, paint, uninstallUI, update`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### FileChooserUI

          public FileChooserUI()

  - ### Method Detail

    - #### getAcceptAllFileFilter

          public abstract FileFilter getAcceptAllFileFilter(JFileChooser fc)

    - #### getFileView

          public abstract FileView getFileView(JFileChooser fc)

    - #### getApproveButtonText

          public abstract String getApproveButtonText(JFileChooser fc)

    - #### getDialogTitle

          public abstract String getDialogTitle(JFileChooser fc)

    - #### rescanCurrentDirectory

          public abstract void rescanCurrentDirectory(JFileChooser fc)

    - #### ensureFileIsVisible

          public abstract void ensureFileIsVisible(JFileChooser fc,
                                                   File f)

    - #### getDefaultButton

          public JButton getDefaultButton(JFileChooser fc)

      Returns default button for current `LookAndFeel`. `JFileChooser` will use this button as default button for dialog windows.
      Since:
        1.7

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2026, Oracle and/or its affiliates. All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.