--- old/src/java.desktop/share/classes/javax/print/ServiceUI.java 2016-02-15 12:18:02.787682156 +0530 +++ new/src/java.desktop/share/classes/javax/print/ServiceUI.java 2016-02-15 12:18:02.567682164 +0530 @@ -211,18 +211,32 @@ } Rectangle dlgBounds = dialog.getBounds(); - // get union of all GC bounds - GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment(); - GraphicsDevice[] gs = ge.getScreenDevices(); - for (int j=0; j gcBounds.x) { + x = (gcBounds.x + gcBounds.width) - dlgBounds.width; + dlgWidth = dlgBounds.width;; + } else { + x = gcBounds.x; + dlgWidth = gcBounds.width; + } + if ((gcBounds.y + gcBounds.height - dlgBounds.height) > gcBounds.y) { + y = (gcBounds.y + gcBounds.height) - dlgBounds.height; + dlgHeight = dlgBounds.height; + } else { + y = gcBounds.y; + dlgHeight = gcBounds.height; + } + dialog.setBounds(x, y, dlgWidth, dlgHeight); } dialog.show();