• Post Reply Bookmark Topic Watch Topic
  • New Topic

How to put my JOptionPane to the top of my desktop windows  RSS feed

 
Yeltek Tsai
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I was trying to write a small program which would notify me every 30 minutes or so to take a rest (as you might know that health is a very important issue) by lauching a JOptionPane.showMessageDialog.

Here comes the problem:
"when the time was up, the message dialog got fired but I was still un-notified !! it was completely COVERED by the other application windows, like MSWord, IE, etc."

I was wondering if anyone could make it on the top of EVERY WINDOW when every time it popped ?

I want the message dialog shows on the top at the moment it launched (but not necessary to be always-on-top). Or is it possible to make the dialog launched just like MSN (when your friend logins).

PS: actually i am getting sad about it, cuz the icon even not twinking in the task bar. it looks like nothing happened until I click on it and see the message dialog then.

PS2: I use sound instead now (by JNI) and if any of you has the same health concerns as me, i will be glad to share the program.
[ September 09, 2004: Message edited by: Yeltek Tsai ]
 
Yeltek Tsai
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ok...I found one solution: toFront()

first you have to invoke the toFront() method of the frame to get it on the top of the application windows and then the JOptionPane.showMessageDialog() goes.
[ September 15, 2004: Message edited by: Yeltek Tsai ]
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!