wood burning stoves 2.0*
The moose likes Swing / AWT / SWT and the fly likes showOpenDialog box Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "showOpenDialog box" Watch "showOpenDialog box" New topic
Author

showOpenDialog box

tomo black
Greenhorn

Joined: Mar 01, 2004
Posts: 11
hi, just a simple question i think. when i open the dialog box, in the "Files of Type" it defaults to "All types". i would like to change this so that only one type of file is displayed. eg: .class
how is this done?
thanks in advance
Ted Reynolds
Greenhorn

Joined: Mar 16, 2004
Posts: 20
If you are using the JFileChooser, you need to set the FileFilter of the chooser. Examples of how to do this are in the demo/jfc/ directory in the Java 2 SDK, Standard Edition.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: showOpenDialog box