• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Remove "All Files" Dropdown from JFileChooser

 
Ranch Hand
Posts: 510
Google Web Toolkit Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all,
I need to customize a JFileChooser a bit .
first i want to Remove "All Files" Dropdown (the label "all files" and also the combobox) or make them invisible.
I also want to change the label for first Combobox " look in" into label text "where".
can some one show a way to do that ?

many thanks.
 
Ranch Hand
Posts: 150
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

You can remove all files filter from JFileChooser using following method of JFileChooser

setAcceptAllFileFilterUsed(false);

Regards,
Anand
 
Yahya Elyasse
Ranch Hand
Posts: 510
Google Web Toolkit Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you,
I managed to remove the "all files" drop down menu and it's corresponding Label.
I used a method that goes through the Components of JFileChooser get the component i want and make it invisible.
Now I'm still trying to change the "Look In" Label to String "where" .I want this to be done on a Mac OS platform. however when I run my code on windows/linux i'm able to find a reference to GLable "Look In" ; but when i run same method on Mac I don't get the debug Infos related to JLabel "Look In".
Any Ideas about this issue ?
thanks.
 
reply
    Bookmark Topic Watch Topic
  • New Topic