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

How to Blink Swing window when it is minimised?  RSS feed

 
Parshuram Walunjkar
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,
Iam trying to develop some swing application for that Iam use swing window.This is for a messenger,
1) In one user is chatting with multiple user then if one window in minimised and suppose a new message has come.Then Iam put message on that window but user does not know whether message is come or not.
2)For that I want to blink the window until and unless user sees the message.
Please help me.
Regards
from Parshuram Walunjkar
 
Nathan Pruett
Bartender
Posts: 4121
IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I've been messing around with the following code to do this... it seems to work intermittently on my Windows 2000 box at work. If the frame is minimized, but selected on the taskbar, it won't flash. Sometimes the frame is not selected on the taskbar and it grabs focus with the toFront() call and doesn't blink, and sometimes it does. Sometimes the blink is slow, sometimes fast. And I'm not sure at all what would happen on other platforms!

All in all, I would go with my previous suggestion in this post and use a flashing icon instead of a flashing taskbar reference.

Though you are welcome to see the code where I tried to do it and see if you can get it to work -



-Nate

P.S. - You need to re-register with a user name that follows the JavaRanch User Name Guidelines. You are required to have a user name in the form "First Name" + space + "Last Name". Thanks!
[ February 28, 2002: Message edited by: Nathan Pruett ]
 
Parshuram Walunjkar
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi ,
Thanks for reply.
I want such thing that you done but,at the same time i want blink the iconified window as like yahoo messenger.
Can you or anyone suggest me about that one.
Please help me.
Regards From Parshuram
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!