Skip to Main Content

Java SE (Java Platform, Standard Edition)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

How to react on events fired by a JFileChooser?

843804Mar 29 2005 — edited Mar 31 2005
Hello again.

I hava a FileChooser in my application to load an XML-file and then show its contents in a tab of a JTabbedPane.
When the user chooses a file and then clicks on the open-button of the dialog, I want to check if the file exists. In case of a non-existing file I want to show a modal MessageDialog with a corresponding message. During this time the file dialog must not close and stay open until the user cancels the operation or chooses an existing file.

What do I have to do to achieve this? I think I have to add an actionlistener and override the actionPerformed-method of the open-button. But how? Can you perhaps give me a little code example?

Comments

Soory
Check the permissions under NetApp.
Nik
Hi.

It's features of /net automount.

It's only one time ask server about shares.
You can :
1. Go /net/<IP address of NetApp>/
and see new shared folders

2. Stop autofs ; umount all from /net ; start again autofs

3. Create separate automount map with wildcard.


Regards
976613
Thanks for the tips.
1. Go /net/<IP address of NetApp>/ and see new shared folders
This is the problem; I do not see the newly created shares while the old ones are still there.
2. Stop autofs ; umount all from /net ; start again autofs
It seems to be dramatic to stop autofs and unmount in order for it to pick up the changes (i.e. newly added volumes on the NFS server/NetApp filer).

autofs does not seem to have a way to refresh without restarting autofs daemon...?

Thanks,
Nik
Hi.

It's problem not with autofs. It's problem with special wildcard /net

It's only once ask servers for available shares.
In case you have many aliases at /etc/hosts for one IP it wiil ask every undepend.

In case it temporaru case - more easy just mount new shares on separate dirs.

In case it permanent case ( you quickly create new shares) - good solutions create separate automount map.


Regards.
1 - 4
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Apr 28 2005
Added on Mar 29 2005
4 comments
529 views