Flashing Windows XP taskbar
Many Windows applications now flash in the taskbar when the user should take some action with the window. For example, this is very common with instant messaging applications. When a new message comes in, the window starts flashing until it gets focus. As far as I can tell, there isn't a way to duplicate this behavior using just Swing with no native code. Does anyone know of a workaround? Or, are there any JNI libs for duplicating this behavior? Two approaches sort of come close that I've found so far:
1) Change the frame icon on a timer to make it flash. However, this doesn't change the entire taskbar button so it looks a bit strange.
2) Requesting window focus seems to sort of work, but it's the wrong behavior in general since the window *will* get focus over all the other Java windows you have open instead of just flashing. This is not what you want with an IM application (for example, if you have many IM windows open).