Me n My Programming

If Only I Have TIme

Marama Code 111 ~ How to create Open File Dialog

You can read the full example that I followed here: Link1

FileDialog fd = new FileDialog(s, SWT.OPEN); // open the file dialog
fd.setText(title); // set the dialog tittle
fd.setFilterPath(defDir); // get the current path
String[] filterExt =  { “*.txt”, “*.doc”, “.rtf”, “*.*” }; // filter what you want to open
String selected =; // get the file path



Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s


This entry was posted on August 26, 2010 by in Java, Life on Marama.
%d bloggers like this: