src/share/classes/java/awt/Dialog.java

Print this page

        

*** 1035,1045 **** Component predictedFocusOwner = null; try { predictedFocusOwner = getMostRecentFocusOwner(); if (conditionalShow(predictedFocusOwner, time)) { modalFilter = ModalEventFilter.createFilterForDialog(this); ! Conditional cond = new Conditional() { @Override public boolean evaluate() { return windowClosingException == null; } }; --- 1035,1045 ---- Component predictedFocusOwner = null; try { predictedFocusOwner = getMostRecentFocusOwner(); if (conditionalShow(predictedFocusOwner, time)) { modalFilter = ModalEventFilter.createFilterForDialog(this); ! final Conditional cond = new Conditional() { @Override public boolean evaluate() { return windowClosingException == null; } };
*** 1065,1075 **** } } modalityPushed(); try { ! EventQueue eventQueue = Toolkit.getDefaultToolkit().getSystemEventQueue(); secondaryLoop = eventQueue.createSecondaryLoop(cond, modalFilter, 0); if (!secondaryLoop.enter()) { secondaryLoop = null; } } finally { --- 1065,1080 ---- } } modalityPushed(); try { ! final EventQueue eventQueue = AccessController.doPrivileged( ! new PrivilegedAction<EventQueue>() { ! public EventQueue run() { ! return Toolkit.getDefaultToolkit().getSystemEventQueue(); ! } ! }); secondaryLoop = eventQueue.createSecondaryLoop(cond, modalFilter, 0); if (!secondaryLoop.enter()) { secondaryLoop = null; } } finally {