aspose file tools
The moose likes Swing / AWT / SWT and the fly likes Problem while disposing JFileChooser Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Problem while disposing JFileChooser" Watch "Problem while disposing JFileChooser" New topic

Problem while disposing JFileChooser

Piyush Tripathi

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

Joined: Oct 27, 2005
Posts: 19903

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

How To Ask Questions How To Answer Questions
I agree. Here's the link:
subject: Problem while disposing JFileChooser