File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Swing / AWT / SWT and the fly likes JFileChooser when used in slow network Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "JFileChooser when used in slow network" Watch "JFileChooser when used in slow network" New topic

JFileChooser when used in slow network

Ivan Radulovic

Joined: Aug 26, 2009
Posts: 3
I am wondering how to implement JFileChooser that would have notification (busy cursor) when operation of browsing folders take longer than usual because network is slow. I experimented a little with NetLimiter application which can slow down local network traffic. JFileChooser instance is set to point on shared folder on remote machine in LAN.

This is my implementation of file chooser:

But with this implementation i can only show busy cursor when dialog is triggered by showOpenDialog or showSaveDialog and only for the first time, when dialog is creating cache of its content. Any next showing of dialog is taking much less time in createDialog method, so busy cursor is being removed quickly. Beside this, there is no busy cursor for operations of changing directories or drives (for this i simply couldn't find suitable method to wrap safely with applyBusyCursor() and restoreDefaultCursor()).
I am using 1.6.0_14 version of java.

I would appreciate any suggestion on this.

Thanks in advance.
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
subject: JFileChooser when used in slow network
It's not a secret anymore!