Java basics
FileDialog
FileDialog control represents a dialog window from which the user can select a file.
Syntax:public class FileDialog
extends Dialog
Example:private void showFileDialogDemo(){
headerLabel.setText("Control in action: FileDialog");
final FileDialog fileDialog = new FileDialog(mainFrame,"Select file");
Button showFileDialogButton = new Button("Open File");
showFileDialogButton.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
fileDialog.setVisible(true);
statusLabel.setText("File Selected :"
+ fileDialog.getDirectory() + fileDialog.getFile());
}
});
Content
License.
All information of this service is derived from the free sources and is provided solely in the form of quotations.
This service provides information and interfaces solely for the familiarization (not ownership) and under the "as is" condition.
Copyright 2016 © ELTASK.COM. All rights reserved.
Site is optimized for mobile devices.
Downloads: 382 / 158775979. Delta: 0.00265 с