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

[macosx] Window with apple.awt.documentModalSheet property is not attached to its owner

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Not an Issue
    • Icon: P4 P4
    • tbd
    • 12
    • client-libs

      The support for “apple.awt.documentModalSheet” property implemented under JDK-8208543 is incomplete. The window with the property “apple.awt.documentModalSheet” set to Boolean.TRUE is not attached to its owner.

      Test case to reproduce the issue:

      import javax.swing.JDialog;
      import javax.swing.JFrame;
      import java.awt.Dialog;
      import javax.swing.JLabel;

      public class DocumentModalSheet {
          public static void main(String[] args) {
              JFrame frame = new JFrame();
              frame.setSize(300,300);
              frame.setLocationRelativeTo(null);
              frame.setVisible(true);
              JDialog dialog =
                      new JDialog(frame, null, Dialog.ModalityType.DOCUMENT_MODAL);
              dialog.getRootPane().putClientProperty("apple.awt.documentModalSheet",
                                                     Boolean.TRUE);
              dialog.add(new JLabel("Hello world!"));
              dialog.pack();
              dialog.setVisible(true);
          }
      }

      Expected result:
      The dialog appears as a sheet attached to the owner

      Actual result:
      The dialog appears as a sheet but is not attached to the owner and located at the upper-left corner of the screen

            honkar Harshitha Onkar
            dmarkov Dmitry Markov
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: