tags:

views:

41

answers:

1

Hi,

I have a java application (1.4.2) that uses 2 JFrames.

The first is Modal=true and appears on top of the second JFrame.

The first JFrame allows the user to "open" a file. Once the file is ready to be displayed, the JFrame is set to setModal=false, and this.dispose() 'd of.

This leaves only the second JFrame on the screen. However, I can't interact with it. The code does not throw any errors and appears to run perfectly fine. BUT I can;t interact with the second JFrame. The ONLY way to exit the JFrame is to hit the stop button on my development envirnment. I literally cannot stop the JFrame by clicking the close button, because I can't even interact with that portion of the JFrame.

Any thoughts?

A: 

I didn't know you could toggle modality. Create a FileChooser in a modal dialog and simply dispose of the dialog when you are done.

Romain Hippeau