• Post Reply Bookmark Topic Watch Topic
  • New Topic

Modal JDialog not always on top  RSS feed

 
Jason Moore
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How do you make a modal JDialog remain on top when you switch between applications. I've noticed this works JOptionPane, but it doesn't work with JDialog. Also, if you Alt-Tab between windows this problem does not occur, only when you switch between windows by clicking the icons on the taskbar. WindowsNT, JDK 1.3.1
 
Gregg Bolinger
Ranch Hand
Posts: 15304
6
Chrome IntelliJ IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
you can't set the parent window to null, so instead of JDialog.showMessageDialog(null, "fjdskajf") you would have JDialog.showMessageDialog(yourparentWindow, "fjdlsajlf")


------------------
Happy Coding,
Gregg Bolinger
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!