JDK-4721470 : Launching a modal dialog in processFocusEvent makes application hang
  • Type: Bug
  • Component: client-libs
  • Sub-Component: java.awt
  • Affected Version: 1.4.1
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • OS: windows_xp
  • CPU: x86
  • Submitted: 2002-07-26
  • Updated: 2002-08-22
  • Resolved: 2002-08-22
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availabitlity Release.

To download the current JDK release, click here.
Other
1.4.2 mantisFixed
Related Reports
Relates :  
Description
###@###.### 2002-07-26

J2SE Version (please include all output from java -version flag):
  java version "1.4.1-rc"
  Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.1-rc-b16)
  Java HotSpot(TM) Client VM (build 1.4.1-rc-b16, mixed mode)

Does this problem occur on J2SE 1.3 or 1.4?  Yes / No (pick one)
 Yes, occurs on J2SE 1.4.0_01 too.


Operating System Configuration Information (be specific):
  Windows XP (All patches to date were applied)

Hardware Configuration Information (be specific):
  PIII 650MHz, RAM 384MB, Rage 128 8MB RAM

Bug Description: 
  Launching a modal dialog in processFocusEvent makes application hang.

Steps to Reproduce (be specific):
  Run the following program. When focus is moved away from the frame, 
  the dialog launches and the application just hangs. If you try to the 
  same thing in processMouseEvent, it works well.

Test program:(Test.java):
===========================================================================
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import javax.swing.event.*;

public class Test {

    public static void main(String[] args) {
        final JFrame f = new JFrame();
        JTextField t = new JTextField("TEST") {
            { enableEvents(AWTEvent.FOCUS_EVENT_MASK
                         | AWTEvent.MOUSE_EVENT_MASK); }
            protected void processFocusEvent(FocusEvent e) {
                super.processFocusEvent(e);
                if (e.getID() == FocusEvent.FOCUS_LOST) {
                    JOptionPane.showMessageDialog(f, "Check");
                }
            }
            protected void processMouseEvent(MouseEvent e) {
                super.processMouseEvent(e);
//                JOptionPane.showMessageDialog(f, "Check");
            }
        };
        f.getContentPane().add(t);
        f.setBounds(100, 100, 200, 200);
        f.show();
    }
}

Comments
CONVERTED DATA BugTraq+ Release Management Values COMMIT TO FIX: mantis FIXED IN: mantis INTEGRATED IN: mantis
2004-08-24

EVALUATION Name: osR10079 Date: 08/02/2002 The problem is the same as 4531693 ======================================================================
2004-08-24