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

showOpenDialog box

tomo black

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

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.
I agree. Here's the link:
subject: showOpenDialog box
It's not a secret anymore!