JFileChooser

Hi

I am using JFileChooser for selecting a file for attachment.

Their is a button on top for creating a new folder.....i want to disable that button.

Based on the selection ( File or directory ), i want to change the label of Approve

button ( open button ).

Also how to set JFileChooser to open the previously opened path.

Also it is possible to set JFileChooser to select multiple files, but how to limit the

number of selection.

If any one can help me with this four problems.

Thanks

--Sunny Jain

[573 byte] By [sunnyjaina] at [2007-11-27 9:39:49]
# 1

I have a custom solution for enhancements to JFileChooser but you'd have to pay me for it. Post again if you're interested. Otherwise...

> Their is a button on top for creating a new

> folder.....i want to disable that button.

This is possible but not built in. To do it, you've got to go through the JFileChooser's child components and disable the right one

> Based on the selection ( File or directory ), i

> want to change the label of Approve

>button ( open button ).

This is tricky. I don't think there's an easy solution for this

> lso how to set JFileChooser to open the previously

> opened path.

RTFM. It's something like JFileChooser.setCurrentDirectory

> Also it is possible to set JFileChooser to select

> multiple files, but how to limit the

>number of selection.

This is going to be extremely tricky.

tjacobs01a at 2007-7-12 23:15:57 > top of Java-index,Desktop,Core GUI APIs...
# 2
> Their is a button on top for creating a new folder.....i want to disable that button.BasicFileChooserUI.getNewFolderAction()Once you get the Action you can disable it.
camickra at 2007-7-12 23:15:57 > top of Java-index,Desktop,Core GUI APIs...