| |||
| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] |
|
Hi ! I have a problem with JFileChooser and Filter The JFileChooser opens and shows the Format option bar empty
Im using OSX , java 1.3.1 and JFileChooser as a applet fc = new
JFileChooser();
fc.setFileSelectionMode(JFileChooser.FILES_AND_DIRECTORIES);
fc.addChoosableFileFilter(new ImageFilter()); public class ImageFilter extends FileFilter { public boolean accept(File f) { if
(f.isDirectory()) {
return true; } String extension
= Utils.getExtension(f); if (extension !=
null) {
if (extension.equals(Utils.tiff) ||
extension.equals(Utils.tif) ||
extension.equals(Utils.gif) ||
extension.equals(Utils.jpeg) ||
extension.equals(Utils.jpg) ||
extension.equals(Utils.png) ||
extension.equals(Utils.pdf))
{
return
true;
} else {
return false;
} } ……… Best Regrds |
_______________________________________________ Do not post admin requests to the list. They will be ignored. Java-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/java-dev/email@hidden This email sent to email@hidden
| Home | Archives | FAQ | Terms/Conditions | Contact | RSS | Lists | About |
Visit the Apple Store online or at retail locations.
1-800-MY-APPLE
Contact Apple | Terms of Use | Privacy Policy
Copyright © 2007 Apple Inc. All rights reserved.