Java Solaris Communities Sun Store Join SDN My Profile Why Join?
 
Bug Database
Bug Detail
Quick Lists
Top 25 Bugs
Top 25 RFE's
Recently Closed Bugs
Printable Page Printable Page


Bug Database
Bug ID: 4636269
Votes 1
Synopsis Deadlock when showing a modal dialog from a windowDeactivated event
Category java:classes_awt
Reported Against merlin-rc1
Release Fixed 1.4.2(mantis)
State 10-Fix Delivered, bug
Priority: 4-Low
Related Bugs 4531693
Submit Date 11-FEB-2002
Description
I am filing this report based on an email.  It is JDK1.4 RC1 feedback.   
See Comments for the email.  

I listed the platform as generic because it wasn't included in the email.  

import java.awt.*;
import java.awt.event.*;
import javax.swing.*;

public class AwtLockBug {

    public AwtLockBug() {
        new MyFrame();
        new MyFrame();
    }

    public class MyFrame extends JFrame {
        public MyFrame() {
            super();
            final MyFrame frame = this;
            addWindowListener(new WindowAdapter() {
                                  public void windowClosing(WindowEvent e) {
                                      System.exit(0);
                                  }
                                  public void windowDeactivated(WindowEvent e) {
                                      new ModalDialog(frame);
                                  }
                              });
            setBounds(0,0,100,100);
            setVisible(true);
        }
    }

    public class ModalDialog extends JDialog {
        public ModalDialog(Frame frame) {
            super(frame, "ModalDialog", true);
            setBounds(100,100,100,100);
            setVisible(true);
        }
    }

    public static void main(String args[]) {
        new AwtLockBug();
    }
}
Work Around
N/A
Evaluation
Commit to fix in mantis (hang).  
 xxxxx@xxxxx  2002-02-11




The problem is the same as 4531693
======================================================================



The problem is the same as 4531693
======================================================================
Comments
  
  Include a link with my name & email   


PLEASE NOTE: JDK6 is formerly known as Project Mustang