Win a copy of Head First Agile this week in the Agile forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

setting a window as "always on top"  RSS feed

 
Tal Tal
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
my project's main window is a JFrame, through that window you can open other windows which are modalic JDialog's.
when i go to other apps while my project is runing, and then return to my project's main window(JFrame) through the tasks bar i wouldnt see the active window in my project which is the modalic JDialog, and so i would have to use ALT+TAB to find it,
my question is, how can i avoid it and set the JDialog's i open as always on top of the JFrame ?

thanks
 
Rachel Swailes
Ranch Hand
Posts: 434
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When you open the JDialog, are you passing the JFrame through as it's parent? If the JDialog has a parent it should show the parent behind the JDialog when the JDialog is opened. Perhaps post some code so we can take a look.


Cheers,
Rachel
 
Tal Tal
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i didnt pass the parent Frame, that's why it didnt work
but now it does
thanks alot
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!