previous |
start |
next
File Dialogs
Use JFileChooser to let a user supply a file name through a file
dialog
- Construct a file chooser object
- Call its showOpenDialog or showSaveDialog method
- Specify null or the user interface component over which to pop
up the dialog
- If the user chooses a file, these methods return
JFileChooser.APPROVE_OPTION
- If the user cancels the selection, these methods return
JFileChooser.CANCEL_OPTION
- If a file is chosen, use GetSelectedFile method to obtain a
File object describing the file
previous |
start |
next