Lines 53-59
Link Here
|
53 |
|
53 |
|
54 |
private final String title; |
54 |
private final String title; |
55 |
|
55 |
|
56 |
private final String filetype; |
56 |
private final String[] filetype; |
57 |
|
57 |
|
58 |
/** |
58 |
/** |
59 |
* Constructor for the FilePanel object. |
59 |
* Constructor for the FilePanel object. |
Lines 66-72
Link Here
|
66 |
this(title, null); |
66 |
this(title, null); |
67 |
} |
67 |
} |
68 |
|
68 |
|
69 |
public FilePanel(String title, String filetype) { |
69 |
public FilePanel(String title, String[] filetype) { |
70 |
this.title = title; |
70 |
this.title = title; |
71 |
this.filetype = filetype; |
71 |
this.filetype = filetype; |
72 |
init(); |
72 |
init(); |
Lines 143-149
Link Here
|
143 |
if(filetype == null){ |
143 |
if(filetype == null){ |
144 |
chooser = FileDialoger.promptToOpenFile(); |
144 |
chooser = FileDialoger.promptToOpenFile(); |
145 |
} else { |
145 |
} else { |
146 |
chooser = FileDialoger.promptToOpenFile(new String[] { filetype }); |
146 |
chooser = FileDialoger.promptToOpenFile(filetype); |
147 |
} |
147 |
} |
148 |
if (chooser != null && chooser.getSelectedFile() != null) { |
148 |
if (chooser != null && chooser.getSelectedFile() != null) { |
149 |
filename.setText(chooser.getSelectedFile().getPath()); |
149 |
filename.setText(chooser.getSelectedFile().getPath()); |