import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.FileDialog;
import org.eclipse.swt.widgets.Shell;
public class MainClass {
public static void main(String[] a) {
Shell s = new Shell();
FileDialog fd = new FileDialog(s, SWT.SAVE);
fd.setText("Save");
fd.setFilterPath("C:/");
String[] filterExt = {"*.txt","*.doc", ".rtf", "*.*"};
fd.setFilterExtensions(filterExt);
String selected = fd.open();
System.out.println(selected);
}
}
|