Basics
Guides
API Reference
Basics
Guides
API Reference
[13:7] extends: FxObj
Wraps JavaFX FileChooser, a dialog that lets the user browse the file system and select one or more files to open or a location to save a file. The dialog supports an optional title, an initial directory, an initial file name, and one or more extension filters to narrow the visible files. Call show() to open a single file, showMultiple() to allow multi-selection, or showSave() to present a save-file dialog.
FileChooser (string Title = null)
Constructor takes the title of the FileChooser dialog.
Title is an optional string with the title of the dialog.this objectsetTitle (string Title)
Sets the dialog title with the provided string.
Title is a string with the title to set.this objectsetInitDir (string Dir)
Sets the initial directory to start the FileChooser dialog in.
Dir is a string with the directory to start in.this objectsetInitFileName (string FileName)
Sets the initial file name of the FileChooser dialog.
FileName is a string with the FileName to set.this objectaddFilter (string FilterName, list ExtList)
Adds the FileChooser filter with the provided name and list of extensions.
FilterName is a string with the name of the filter.ExtList is a list of file extensions for this filter. An example is ['.jpg', '.jpeg', '*.png']this objectshow (MainStage)
Shows the standard FileChooser dialog with the provided main Stage object.
MainStage is the main JavaFX Stage object.A string with the path of the file that was picked or null if no file was chosen.showMultiple (MainStage)
Shows the dialog with the provided main Stage object but allowing multiple file selection.
MainStage is the main JavaFX Stage object.A list of strings with the files that were chosen or an empty list of none were picked.showSave (MainStage)
Shows the dialog with the provided main Stage object but for save file.
MainStage is the main JavaFX Stage object.A string with the path of the file that was picked or null if no file was chosen.getTitle ()
Returns the dialog title.
A string with the title, or null if unset.titleProperty ()
Returns the StringProperty backing the dialog title.
An AJO wrapping javafx.beans.property.StringProperty.setInitialDirectory (File)
Sets the initial directory from a java.io.File AJO. Use setInitDir(string) for the path-string convenience helper.
File is an AJO around java.io.File, or null to clear.this objectgetInitialDirectory ()
Returns the initial directory as a java.io.File AJO.
An AJO wrapping java.io.File, or null if unset.initialDirectoryProperty ()
Returns the ObjectProperty backing the initial directory.
An AJO wrapping javafx.beans.property.ObjectPropertysetInitialFileName (string FileName)
Sets the initial file name shown in the dialog.
FileName is a string with the initial file name, or null to clear.this objectgetInitialFileName ()
Returns the initial file name shown in the dialog.
A string with the initial file name, or null if unset.initialFileNameProperty ()
Returns the ObjectProperty backing the initial file name.
An AJO wrapping javafx.beans.property.ObjectPropertygetExtensionFilters ()
Returns the ObservableList of ExtensionFilter entries on this dialog.
An AJO wrapping javafx.collections.ObservableListselectedExtensionFilterProperty ()
Returns the ObjectProperty backing the selected extension filter.
An AJO wrapping javafx.beans.property.ObjectPropertysetSelectedExtensionFilter (Filter)
Sets the selected extension filter.
Filter is an AJO around javafx.stage.FileChooser$ExtensionFilter, or null.this objectgetSelectedExtensionFilter ()
Returns the currently selected extension filter.
An AJO wrapping javafx.stage.FileChooser$ExtensionFilter, or null.showOpenDialog (OwnerWindow)
Shows the open-file dialog and returns the selected file AJO.
OwnerWindow is the owner Window AJO, or null.An AJO wrapping java.io.File, or null if cancelled.showOpenMultipleDialog (OwnerWindow)
Shows the open-multiple-files dialog and returns the selected files as a List AJO.
OwnerWindow is the owner Window AJO, or null.An AJO wrapping java.util.ListshowSaveDialog (OwnerWindow)
Shows the save-file dialog and returns the selected file AJO.
OwnerWindow is the owner Window AJO, or null.An AJO wrapping java.io.File, or null if cancelled.
Aussom
Write once. Embed everywhere.
Copyright 2026 Austin Lehman. All rights reserved.