Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

overlay window  RSS feed

 
Daniel Gen Li
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How could I make a frame window that stays on top of all other windows... but at the same time isn't in focus? Like a glass pane that just stays on top of all other windows but does not receive any input focus (all other applications continue as is). For example: the balloon messages in windows. They are always on top but they never receive any input focus.

Or is it possible for it to receive input focus while all other applications are still unaffected? Like... if i'm typing in word, and a window pop up.. the word document still receives the keyevents.
 
Rob Camick
Ranch Hand
Posts: 2754
12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I believe you would just create a JDialog and then use:

 
Daniel Gen Li
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you, it works very well. But just wondering, is it possible for two windows to receive keyevents at the same time? like to have my unfocused window also receive keyevents... just wondering...
 
Rob Camick
Ranch Hand
Posts: 2754
12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Only one window can have focus at a time, so only one window can receive events at a time. There is nothing to stop the user from click on the other window to make it active.
 
Daniel Gen Li
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
oh, alrighty then
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!