-
Notifications
You must be signed in to change notification settings - Fork 235
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
JFileChooser doen't work with custom file filters, or showing hidden files #46
Comments
There is indeed something strange happening with filters. |
I found the issue source and fixed it. I also recommend you to extend Here is a small example: public class PropertyFilter extends AbstractFileFilter
{
@Override
public ImageIcon getIcon ()
{
// Your custom icon
return WebLookAndFeel.getIcon ( 16 );
}
@Override
public String getDescription ()
{
// Filter description displayed in combobox
return "Property files";
}
@Override
public boolean accept ( File f )
{
// Filter logic
return f.getName ().endsWith ( ".properties" );
}
} In that case you will be able to provide an icon for your custom filter. You can also use that filter anywhere else because it extends |
Thanks, I will try it ;) |
…hidden files display Custom file filter description display fix CustomFileFilter class added to simplify new filters creation DefaultFileFilter renamed to AbstractFileFilter WebAsyncTreeFilterField translation added WebCheckBoxTree checkboxes can now be hidden/disabled for each node in the tree WebCheckBoxTree recursive checking option added DefaultTreeCheckingModel logic and speed improved Painters improved and now support component update calls Demo application code links highlight improvements RSyntaxTextArea library updated
Fix is now available in v1.24 release: |
I have that code:
With MetalLookAndFeel, file chooser works fine, but if I install WebLookAndFeel (WebLookAndFeel.install( ) ), then it doesn't show hidden files and I can see all files.
The text was updated successfully, but these errors were encountered: