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

[macos] Java frame and dialog presented full screen freeze application

    XMLWordPrintable

Details

    • b26
    • x86_64
    • os_x

    Description

      ADDITIONAL SYSTEM INFORMATION :
      Mac OS Big Sur

      A DESCRIPTION OF THE PROBLEM :
      On the latest Mac OS Big Sur I have a Swing frame which shows a Swing Dialog. If I switch the Swing frame to full screen and then show the dialog, the dialog is also full screen and the user interface freezes.

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      Show a Swing frame, maximize it to full screen, from the frame show a dialog.

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      Showing the dialog should not freeze the entire application.
      ACTUAL -
      I can no longer close the dialog or switch to the main frame.

      ---------- BEGIN SOURCE ----------
          JFrame fr = new JFrame("abc");
          fr.setSize(500, 500);
          fr.getContentPane().add(new JButton(new AbstractAction("TEST") {
            
            @Override
            public void actionPerformed(ActionEvent e) {
              JDialog dlg = new JDialog(fr, false);
              dlg.setSize(500, 500);
              dlg.getContentPane().add(new JTextArea());
              dlg.setVisible(true);
            }
          }));
          fr.setVisible(true);
        }
      ---------- END SOURCE ----------

      CUSTOMER SUBMITTED WORKAROUND :
      Unfortunately the method "com.apple.eawt.FullScreenUtilities.setWindowCanFullScreen" does not seem to work anymore so the only workaround I have is to set the entire frame as not resizable: frame.setResizable(false);

      FREQUENCY : always


      Attachments

        Issue Links

          Activity

            People

              trebari Tejpal Rebari (Inactive)
              webbuggrp Webbug Group
              Votes:
              1 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: