Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4129307

Win32: Focus not restored to base frame when a modal dialog is dismissed.

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P4
    • Resolution: Cannot Reproduce
    • Affects Version/s: 1.1.5, 1.1.6
    • Fix Version/s: None
    • Component/s: client-libs
    • Subcomponent:
    • CPU:
      x86
    • OS:
      windows_nt

      Description


      This came in as a swing bug. But it is a bug in Modal dialogs on
      Win32. Check out the evaluation for details.

      -----------------------

      Name: rk38400 Date: 04/15/98


      After the user dismisses a JOptionPane.showMessageDialog, the application itself looses focus
      (or does not regain it, depending on your point of view)

      Sample Code:

      import java.awt.*;
      import java.awt.event.*;
      import com.sun.java.swing.*;

      public class DialogBug extends JFrame {
      public static void main(String[] args) {
      DialogBug bug = new DialogBug();
      bug.addWindowListener(new WindowAdapter() {
      public void windowClosing(WindowEvent e) {
      System.exit(1);
      }
      });
      bug.pack();
      bug.setVisible(true);
      }

      public DialogBug() {
      super("JOptionPane bug");
      JButton button = new JButton("Show Dialog");
      button.addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent e) {
      JOptionPane.showMessageDialog(null,
      new String("Unable to authenticate user"),
      new String("Login"),
      JOptionPane.ERROR_MESSAGE);
      }
      });
      getContentPane().add(button);
      }
      }
      (Review ID: 27906)
      ======================================================================

        Attachments

          Activity

            People

            • Assignee:
              dmendenhsunw David Mendenhall (Inactive)
              Reporter:
              rkarsunw Ralph Kar (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Imported:
                Indexed: