simulate look in comboBox in JFileChooser

Hi guys;

I tried playing with JFileChooser : i removed all components of JFileChooser except the "look in "comboBox.

but when trying to get the selected drive from this combo : i don't know how to trigger events for this look in combobox in JFileChooser.

can we do that ?

if not .is it possible to simulate the "look in" comboBox of JFileChooser by writing from sratch ?

i would appreciate your help.

thanks.

[452 byte] By [Servant@AKa] at [2007-10-3 10:21:18]
# 1
> if not .is it possible to simulate the "look in" comboBox of FileChooser by writing from sratch ?I think you use:File[] files = FileSystemView getFileSystemView().getRoots();
camickra at 2007-7-15 5:42:46 > top of Java-index,Desktop,Core GUI APIs...
# 2
Thank you for your reply:I just wanted to know if above code will list also all mounted volumes & drives on a Mac OS X platform or linux.I think this works good on windows but still need to test it on Linux.will be back to you when i test it.thanks.
Servant@AKa at 2007-7-15 5:42:46 > top of Java-index,Desktop,Core GUI APIs...
# 3
Searching through the source code I found this which I think is more what you are looking for:File[] baseFolders = (File[])sun.awt.shell.ShellFolder.get("fileChooserComboBoxFolders");
camickra at 2007-7-15 5:42:46 > top of Java-index,Desktop,Core GUI APIs...
# 4

> Searching through the source code I found this which

> I think is more what you are looking for:

> File[] baseFolders =

> (File[])sun.awt.shell.ShellFolder.get("fileChooserComb

> oBoxFolders");

very interesting piece of code :I will give that a try.

I appreciate a lot your replies.thanks much

Servant@AKa at 2007-7-15 5:42:46 > top of Java-index,Desktop,Core GUI APIs...
# 5

> Searching through the source code I found this which

> I think is more what you are looking for:

> File[] baseFolders =

> (File[])sun.awt.shell.ShellFolder.get("fileChooserComb

> oBoxFolders");

I tried the code but unfortunately it doesn't work on Linux .

it's giving me only / (root directory).

is there a way to list all mounted partitions on Linux box ? (i'm looking for the easiest solution)

thanks much.

Servant@AKa at 2007-7-15 5:42:46 > top of Java-index,Desktop,Core GUI APIs...