title: Swing multiple always on top dialogs don't work independently when they have the same owner
body: <p>We had a request that some dialogs should always be on top based on some control. This must be switched on/off on a per dialog basis.
  Using the following code, and going through the following steps seems to me like a Java bug:</p>
  
  <ol>
  <li>Set dialog1 on top. Check it stays on top.</li>
  <li>Set dialog2 on top. Check both dialogs stay on top.</li>
  <li>Set dialog1 not on top. </li>
  </ol>
  
  <p>Expected: dialog2 remains on top and dialog1 doesn't</p>
  
  <p>Actual:   none of the dialogs remain on top.</p>
  
  <p>This has some connection with the owner of the dialogs. If you uncomment the block comments, everything works as expected but I don't think this is normal behaviour since Always on Top should not be connected to the parent. Is this normal or is it an issue with Swing? Unfortunately setting a new owner for each dialog introduces other issues.</p>
  
  <pre><code>public static void main(String[] args) {
      final JFrame rahan = new JFrame("Rahan");
      rahan.setSize(new Dimension(1000,1000));
      rahan.setVisible(true);
  
  
      JDialog d1 = getJDialog(/*new JFrame()*/);
      JDialog d2 = getJDialog(/*new JFrame()*/);
  }
  
  private static JDialog getJDialog(/*JFrame owner*/) {
      final JDialog jDialog = new JDialog(/*owner*/);
      final JButton onTop = new JButton("OnTop");
      onTop.addActionListener(new ActionListener() {
          @Override
          public void actionPerformed(ActionEvent e) {
              jDialog.setAlwaysOnTop(!jDialog.isAlwaysOnTop());
          }
      });
      jDialog.add(onTop);
      jDialog.setVisible(true);
      jDialog.pack();
      return jDialog;
  }
  </code></pre>