-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfileCh.java
More file actions
36 lines (23 loc) · 802 Bytes
/
fileCh.java
File metadata and controls
36 lines (23 loc) · 802 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
package utilerias;
import java.io.File;
import javafx.stage.FileChooser;
public class fileCh {
private FileChooser.ExtensionFilter imageFilter = null;
FileChooser fc = null;
public fileCh(){
this.imageFilter = new FileChooser.ExtensionFilter("Image Files", "*.jpg", "*.png");
this.fc = new FileChooser();
this.fc.setTitle("Seleccione Documento deseado");
this.fc.getExtensionFilters().add(imageFilter);
}
public File open(){
File i = null;
try{
i = this.fc.showOpenDialog(null);
}
catch(Exception ex){
msg.error(ex.toString());
}
return i;
}
}