Skip to main content

printdialog not on top

3 replies [Last post]
mario1204
Offline
Joined: 2010-09-30

On a JSP page I added a printbutton which opens a printdialog. Via the struts framework I retrieve the fields on the JSP page in my java classes (controllers) which are running on locally installed tomcat server. In the java controller I am calling the standard Java dialogs java.awt.print.PrinterJob:printDialog or javax.print.ServiceUI.printDialog.
The printDialogs are shown and are modal (they interrupt my thread and I can not proceed working on the webpage shown in IE 7) and the printing code works perfectly. Problem is that the printdialogs (tried them both) are hidden under the webpage. How can I bring them on top of my internet explorer screen? Strange thing is that when I debug the controller coding the printdialog is shown in front of the webpage. How can this behavior be explained?

Message was edited by: mario1204

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
anthony_p
Offline
Joined: 2006-07-24

There's a number of known issues when modality+browser are involved together. For example, see

http://bugs.sun.com/view_bug.do?bug_id=6536861

which is quite similar to the behavior you're observing. I've update the bug to include a link to this forum post. Please watch the bug for further updates.

mario1204
Offline
Joined: 2010-09-30

thanks anthony_p for your reply. Any suggestion for a workaround/other approach?

anthony_p
Offline
Joined: 2006-07-24

None that I know of.

Just a thought: you may try specifying a non-null parent for your print or file dialog - like a dummy, invisible "new Frame()", or a real visible frame. Perhaps this could tweak the behavior a little, but there's no any guarantee. Sorry.