Re: JFileChooser hangs
Andrew Thompson schrieb:
Hansi wrote:
...
I am very frustrated, cause an applet...
URL?
..., i developed 2 years ago, now does
not work anymore.
...
JFileChooser jfc= New JFileChooser();
That would not compile, care to link to your
*real* code instead?
This line of code is in a function, and when the function is called the
second time, the application hangs and does not execute the lines of
code under this line.
As an aside. Your applet is signed?
Andrew T.
Yes, i signed the applet, to get local fileaccess.
I cannot get any infos from the System.out.... because the VM crashes
and there is no response.
What is this:
confining Swing activity to the Event Dispatch Thread (EDT) ??
Can anyone send an example?
The code is:
JFileChooser jfc = new JFileChooser();
if (lastopenpath.length()>0){
jfc.setCurrentDirectory(new File(lastopenpath));
}
jfc.setFileSelectionMode(JFileChooser.FILES_ONLY);
jfc.setMultiSelectionEnabled(true);
jfc.setDragEnabled(false);
//int res=jfc.showOpenDialog(new JFrame());
int res=jfc.showOpenDialog(null);
if (res==JFileChooser.APPROVE_OPTION){
....
}