jdk/src/share/classes/com/sun/java/swing/plaf/motif/MotifFileChooserUI.java
changeset 5957 73a2c01f5843
parent 5506 202f599c92aa
child 10100 c525c5fbb86c
--- a/jdk/src/share/classes/com/sun/java/swing/plaf/motif/MotifFileChooserUI.java	Fri Jul 02 19:34:34 2010 +0400
+++ b/jdk/src/share/classes/com/sun/java/swing/plaf/motif/MotifFileChooserUI.java	Thu Jul 08 19:09:41 2010 +0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -271,7 +271,9 @@
     }
 
     public void uninstallUI(JComponent c) {
-        getFileChooser().removeAll();
+        c.removePropertyChangeListener(filterComboBoxModel);
+        approveButton.removeActionListener(getApproveSelectionAction());
+        filenameTextField.removeActionListener(getApproveSelectionAction());
         super.uninstallUI(c);
     }
 
@@ -515,6 +517,7 @@
 
     public void uninstallComponents(JFileChooser fc) {
         fc.removeAll();
+        bottomPanel = null;
         if (filterComboBoxModel != null) {
             fc.removePropertyChangeListener(filterComboBoxModel);
         }