Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Message box at front of screen

Status
Not open for further replies.

adrianjohnson

Programmer
May 16, 2002
145
GB
How do I make a message box (sorry, JOptionPane) display at the front of the screen in an app? At the moment when it displays, it hides behind all the other open windows.

Thanks,

Adrian Johnson
 
So the user doesn't have to minimise other screens in order to see it.
 
i also ran into this problem, i think i solved it by attaching the JOptionPane to another component such as a JFrame
 
Maybe Adrian means 'how do I make it appear in front of ALL running apps'?
 
Post the code you are currently using to show the JoptionPane - new2this2002 I think was on the right track - I normally use

showDialog(this.getContentPane, "Hello"), which shows it at the front

"this" is the JFrame that the JOptionPane is being shown from

Mark [openup]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top