--- old/src/java.desktop/share/classes/sun/print/ServiceDialog.java 2018-05-24 15:22:30.628327686 -0700 +++ new/src/java.desktop/share/classes/sun/print/ServiceDialog.java 2018-05-24 15:22:30.412327690 -0700 @@ -184,8 +184,19 @@ isAWT = true; } - if (attributes.get(DialogOnTop.class) != null) { - setAlwaysOnTop(true); + if (attributes.get(DialogOwner.class) != null) { + DialogOwner owner = (DialogOwner)attributes.get(DialogOwner.class); + /* When the ServiceDialog is constructed the caller of the + * constructor checks for this attribute and if it specifies a + * window then it will use that in the constructor instead of + * inferring one from keyboard focus. + * In this case the owner of the dialog is the same as that + * specified in the attribute and we do not need to set the + * on top property + */ + if ((getOwner() == null) || (owner.getOwner() != getOwner())) { + setAlwaysOnTop(true); + } } Container c = getContentPane(); c.setLayout(new BorderLayout()); @@ -278,8 +289,12 @@ this.asOriginal = attributes; this.asCurrent = new HashPrintRequestAttributeSet(attributes); - if (attributes.get(DialogOnTop.class) != null) { - setAlwaysOnTop(true); + if (attributes.get(DialogOwner.class) != null) { + /* See comments in same block in initPrintDialog */ + DialogOwner owner = (DialogOwner)attributes.get(DialogOwner.class); + if ((getOwner() == null) || (owner.getOwner() != getOwner())) { + setAlwaysOnTop(true); + } } Container c = getContentPane();