| Author |
Problem while disposing JFileChooser
|
Piyush Tripathi
Greenhorn
Joined: Jan 28, 2009
Posts: 16
|
|
Hi i am calling JFileChooser from a class which extends JFileChooser. I have to add the funtionality for file overwrite error message. In the class which extends the file chooser i am overriding method approveSelection() in which i am checking whether the file already exists.My problem is when the the JOption dialog for YES/NO/CANCEL appears when i want to overwrite the file i am pressing yes option but the JFileChooser dialog is not disposing off.
Following is a method from where i am calling the class which extends JFileChooser :
Following is a class in which i am overriding the approveSelection method :
|
 |
Rob Spoor
Sheriff
Joined: Oct 27, 2005
Posts: 19216
|
|
Do you call super.approveSelection() if the file can be overridden? I did the same in one of my classes, and that works just fine (acceptFilter is a java.io.FileFilter):
|
SCJP 1.4 - SCJP 6 - SCWCD 5
How To Ask Questions How To Answer Questions
|
 |
 |
|
|
subject: Problem while disposing JFileChooser
|
|
|