Class WindowsFolderBrowser

java.lang.Object
anlavn.ui.filechooser.WindowsFolderBrowser

public class WindowsFolderBrowser extends Object
The native Windows folder browser. Example: WindowsFolderBrowser fb = new WindowsFolderBrowser(); File dir = fb.showDialog(parentWindow); if (dir != null) { // do something with dir }
  • Constructor Details

    • WindowsFolderBrowser

      public WindowsFolderBrowser()
      creates a new folder browser
    • WindowsFolderBrowser

      public WindowsFolderBrowser(String title)
      creates a new folder browser with text that can be used as title or to give instructions to the user
      Parameters:
      title - text that will be displayed at the top of the dialog
  • Method Details

    • setTitle

      public void setTitle(String title)
    • showDialog

      public File showDialog(Window parent)
      displays the dialog to the user
      Parameters:
      parent - the parent window
      Returns:
      the selected directory or null if the user canceled the dialog