United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-4721470 Launching a modal dialog in processFocusEvent makes application hang
JDK-4721470 : Launching a modal dialog in processFocusEvent makes application hang

Details
Type:
Bug
Submit Date:
2002-07-26
Status:
Resolved
Updated Date:
2002-08-22
Project Name:
JDK
Resolved Date:
2002-08-22
Component:
client-libs
OS:
windows_xp
Sub-Component:
java.awt
CPU:
x86
Priority:
P4
Resolution:
Fixed
Affected Versions:
1.4.1
Fixed Versions:
1.4.2 (mantis)

Related Reports
Relates:

Sub Tasks

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
EVALUATION



Name: osR10079			Date: 08/02/2002

The problem is the same as 4531693
======================================================================
                                     
2004-08-24
CONVERTED DATA

BugTraq+ Release Management Values

COMMIT TO FIX:
mantis

FIXED IN:
mantis

INTEGRATED IN:
mantis


                                     
2004-08-24



Hardware and Software, Engineered to Work Together