public class FileOpenSaveDialog extends Object
| Constructor and Description |
|---|
FileOpenSaveDialog(Component parentUI,
FileFilter fileFilter)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
File |
openFile()
open a file prompting user to select the file.
|
boolean |
saveFile(byte[] bytes,
String extension)
Saves data into a file after the user is prompted to choose the destination.
|
public FileOpenSaveDialog(Component parentUI, FileFilter fileFilter)
parentUI - the main UI (JFrame) on top of which File open/save dialog should open.fileFilter - file Filter, null is allowed when no filter is applicable.public boolean saveFile(byte[] bytes,
String extension)
throws IOException
bytes - byte array to be saved in a file.IOException - if there is an error in creation of the file.public File openFile() throws IOException
IOException - if there is error in opening the file.Copyright © 2002–2018 The Apache Software Foundation. All rights reserved.