Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > JFileChooser - File Filter - Need help getting rid of "All Files" option

Reply
Thread Tools

JFileChooser - File Filter - Need help getting rid of "All Files" option

 
 
nbuserx@netbeans.org
Guest
Posts: n/a
 
      01-28-2005
Hi all,

I would really like to know how to get rid of the option "All
Files" inside the JFileChooser, I have my own filter applied so
that it only can see directories and *.mdb files but... the "All
Files" option still is there, I would like to get rid of it
altogether.

Any help please.

Thanks, Asif

----------------------------------------------
Posted with NewsLeecher v1.0 Final
* Binary Usenet Leeching Made Easy
* http://www.newsleecher.com/?usenet
----------------------------------------------

 
Reply With Quote
 
 
 
 
mprudhom
Guest
Posts: n/a
 
      01-28-2005
I think you might want:

JFileChooser.setAcceptAllFileFilterUsed(false);

See:


http://java.sun.com/j2se/1.4.2/docs/...erUsed(boolean)

 
Reply With Quote
 
 
 
 
nbuserx@netbeans.org
Guest
Posts: n/a
 
      01-28-2005
----------------------------------------------
Posted with NewsLeecher v1.0 Final
* Binary Usenet Leeching Made Easy
* http://www.newsleecher.com/?usenet
----------------------------------------------

 
Reply With Quote
 
I82Much I82Much is offline
Junior Member
Join Date: May 2009
Posts: 3
 
      05-05-2009
Hi folks:

I know this is an old topic, but it's relevant to me. My problem is that you can still select the greyed out items and choose the "OK" button. So for instance, I am filtering to only accept .3DS file extensions. But it will let you select any file that doesn't have that extension, it's just greyed out, and then you click OK and it acts as if it were a legitimate .3DS file (from the point of view of the file chooser)

Any idea how to fix this?
 
Reply With Quote
 
deea deea is offline
Junior Member
Join Date: Jun 2009
Posts: 1
 
      06-03-2009
Hi I82Much!

I do not know if you fixed the problem. It seems to me that there should be a problem with your filter. In my opinion you should see just the files with .3DS extension. Seeing the code would help a lot...
 
Reply With Quote
 
I82Much I82Much is offline
Junior Member
Join Date: May 2009
Posts: 3
 
      06-03-2009
The filter seems to work fine; I will attach the code and you can see for yourself, as well as a screenshot of what I mean

http: //pastebin.com/f4cc5acc0


http: //web5.twitpic.com/img/10997124-5597f583c2b002b714b0a2252eb682cd.4a26c855-scaled.png

http: //web1.twitpic.com/img/10997167-8c2cb0b7f03481ae0f33a1c53eaad144.4a26c878-scaled.png

http: //web5.twitpic.com/img/10997226-e0103534c59fe994db811f2475f4e157.4a26c897-scaled.png

As you can see, even though the .txt files are greyed out, you can click them and select them.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to remove JFileChooser default accept all file filter? Allen Java 6 09-17-2013 11:12 PM
Need help getting rid of Keylogger Carol A Computer Support 2 12-21-2005 02:10 AM
Need help getting rid of chkdsk at startup June Computer Information 3 05-12-2005 03:43 PM
JFileChooser and file filter events Anand Gopinath Java 0 05-27-2004 05:38 PM
Need help getting rid of Trojan!!! Speck Tater Computer Support 5 04-11-2004 03:10 AM



Advertisments