I have a web application written in
JSP. When a user clicks on certain buttons I want to display a modal YES_NO JDialog asking the user to confirm their selection (the easy part). However, despite using toFront(), setVisible() and show() methods, the window when first created remains behind the browser. Subsequent calls to display the message work fine. Is there a way of ensuring the window is to the front every time (without using javascript)?