JFileChooser lockup...

Hi folks. I've got an applet that uses JFileChooser and it used to work but many revisions have passed and now when I open the dialog I see the window frame but nothing ever appears inside of it so I have to use task manager to kill the browser process. This is on Windows XP and I tried 1.5.0 and 1.6.2 versions of the JRE.

Now the old code works and the applet is heavily multi-threaded soI'm thinking that some how I'm causing a dead lock with the AWT thread. The only problem with this is that when I comment out the:

returnVal = chooser.showDialog(null, "Save Attachment");

line everything runs along nice and smooth even the subsequent Swing dialogs function just fine. If I was deadlocking the AWT thread I would think that all of the dialogs would stop working. I'm hoping someone has run into something similar before because I'm at a loss as to what to do.

I could roll back to previous versions of the code but that will require 100's of classes to change and I'd still just be guessing.

[1036 byte] By [zparticlea] at [2007-11-27 11:14:51]
# 1

JFileChooser access a local file system which is not permitted unless the JAR or applet is signed. It could be that your certificate has expired and needs to be renewed.

Read about the key signing tools in the jdk documentation for more info. This is as much a suggestion as I can give

ICE

icewalker2ga at 2007-7-29 14:09:25 > top of Java-index,Desktop,Core GUI APIs...
# 2

Yeah the cert is fine. I tried moving the call out to another place in the code and it worked fine so I have sort of thread deadlock issue.

zparticlea at 2007-7-29 14:09:25 > top of Java-index,Desktop,Core GUI APIs...
# 3

Okay so I was calling the method on a thread from another thread to cause the dialog code to run. I changed it around and sent an "event" to the download thread queue. This makes sure that the code is being called from the download thread context and that seems to have fixed it. Why it used to work I have no idea.

zparticlea at 2007-7-29 14:09:25 > top of Java-index,Desktop,Core GUI APIs...