Lines 38-44
Link Here
|
38 |
*/ |
38 |
*/ |
39 |
private static String lastJFCDirectory = null; |
39 |
private static String lastJFCDirectory = null; |
40 |
private static JFileChooser jfc = new JFileChooser(); |
40 |
private static JFileChooser jfc = new JFileChooser(); |
41 |
private static String[] extensions = null; |
|
|
42 |
|
41 |
|
43 |
/** |
42 |
/** |
44 |
* Prevent instantiation of utility class. |
43 |
* Prevent instantiation of utility class. |
Lines 107-116
Link Here
|
107 |
* @param filters |
106 |
* @param filters |
108 |
* @return |
107 |
* @return |
109 |
*/ |
108 |
*/ |
110 |
public static JFileChooser promptToSaveFile(String filename, String[] filters){ |
109 |
public static JFileChooser promptToSaveFile(String filename) |
111 |
extensions = filters; |
110 |
{ |
112 |
JFileChooser chooser = promptToSaveFile(filename); |
111 |
return promptToSaveFile(filename, null); |
113 |
return chooser; |
|
|
114 |
} |
112 |
} |
115 |
|
113 |
|
116 |
/** |
114 |
/** |
Lines 125-131
Link Here
|
125 |
* are finished using it (accept or otherwise). |
123 |
* are finished using it (accept or otherwise). |
126 |
* @see #promptToOpenFile |
124 |
* @see #promptToOpenFile |
127 |
*/ |
125 |
*/ |
128 |
public static JFileChooser promptToSaveFile(String filename) |
126 |
public static JFileChooser promptToSaveFile(String filename, String[] extensions) |
129 |
{ |
127 |
{ |
130 |
if (lastJFCDirectory == null) |
128 |
if (lastJFCDirectory == null) |
131 |
{ |
129 |
{ |