tags:

views:

115

answers:

2

we use setDefaultclose Operation(JFrame.EXIT_ON_CLOSE) for JFrame and those classes that implements JFrame.

what can we do like this for JFileChooser????(the window that suddenly when you push browse button will pups up)

+1  A: 

On a closing JFileChooser you normally don't want to exit your application, at first you want to get the inputs the user made from the dialog. After that you can call System.exit() directly.

Mnementh
A: 

You can put a JFileChooser on a custom JFrame and set the default close operation on that JFrame.

Maurice Perry