Forums Register Login

JFileChooser opendialog question

+Pie Number of slices to send: Send
Hi,

When I use showOpenDialog, how I can disable the "create new folder" icon in the filechoose. I can not figure out how to change property related with this opendialog.

Thanks.

-y
+Pie Number of slices to send: Send
The new folder button is created, configured and added to the JFileChooser in the installComponents method of the javax.swing.plaf.metal.MetalFileChooserUI class for the default LookAndFeel. You can remove the button with this
+Pie Number of slices to send: Send
How did you get it enabled to begin with?
(mine always show up disabled)

Anyway, here is a HACK (notice the capital letters indicating that not self respecting developer would actually use this approach in thier application)




This works, but there must be a better way to do this.
+Pie Number of slices to send: Send
Thank you all.

It works using Jefff's HACK. Not Craig's. I am still trying to use Craig's self respecting way.

Thanks.

-y
+Pie Number of slices to send: Send
Make sure you put the property before instantiating the JFileChooser.
+Pie Number of slices to send: Send
You had your fun. Now it's time to go to jail. Thanks for your help tiny ad.
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 4965 times.
Similar Threads
Java Script in JSP page
Display a file in Notepad
JFileChooser
In JFileDialog how to use the save window
Problem with JFileChooser Create New Folder when Program Files folder is selected.
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 06:21:48.