[hg] main-silver: #221422: Call Dialog.setVisible(false) in EDT

  • From: Jaroslav Havlin < >
  • To:
  • Subject: [hg] main-silver: #221422: Call Dialog.setVisible(false) in EDT
  • Date: Wed, 14 Nov 2012 10:43:18 -0800

changeset 29e557b81e55 in main-silver ((none))
details: http://hg.netbeans.org/main-silver/rev/29e557b81e55
description:
        #221422: Call Dialog.setVisible(false) in EDT

diffstat:

 db/src/org/netbeans/modules/db/explorer/action/ConnectAction.java |  12 
+++++++++-
 1 files changed, 11 insertions(+), 1 deletions(-)

diffs (29 lines):

diff --git 
a/db/src/org/netbeans/modules/db/explorer/action/ConnectAction.java 
b/db/src/org/netbeans/modules/db/explorer/action/ConnectAction.java
--- a/db/src/org/netbeans/modules/db/explorer/action/ConnectAction.java
+++ b/db/src/org/netbeans/modules/db/explorer/action/ConnectAction.java
@@ -46,6 +46,7 @@
 
 import java.awt.Dialog;
 import java.awt.Dimension;
+import java.awt.EventQueue;
 import java.awt.event.ActionEvent;
 import java.awt.event.ActionListener;
 import java.beans.PropertyChangeEvent;
@@ -293,7 +294,16 @@
                     
                     final PropertyChangeListener connectionListener = new 
PropertyChangeListener() {
                         @Override
-                        public void propertyChange(PropertyChangeEvent 
event) {
+                        public void propertyChange(final PropertyChangeEvent 
event) {
+                            EventQueue.invokeLater(new Runnable() {
+                                @Override
+                                public void run() {
+                                    handlePropertyChange(event);
+                                }
+                            });
+                        }
+
+                        private void 
handlePropertyChange(PropertyChangeEvent event) {
                             if (event.getPropertyName().equals("connected")) 
{ //NOI18N
                                 try {
                                     connector.finishConnect(null, dbcon, 
dbcon.getConnection());

[hg] main-silver: #221422: Call Dialog.setVisible(false) in EDT

Jaroslav Havlin 11/14/2012

Project Features

About this Project

DB was started in November 2009, is owned by Antonin Nebuzelsky, and has 113 members.
By use of this website, you agree to the NetBeans Policies and Terms of Use (revision 20140418.2d69abc). © 2013, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo
 
 
Close
loading
Please Confirm
Close