Skip to main content

Attracting the users attention to a JFrame

No replies
martinoc
Offline
Joined: 2006-05-05

I have an application which creates and makes visible multiple JFrames. The problem is that I would like to have a reliable way to attract the users attention to that frame. There are a number of restrictions to this. For instance, it should not have the frame steal focus.

On Windows native apps, this is accomplished by flashing the entry on the taskbar. On OS X, the icon in the dock will bounce.

I want to be able to do this consistently across platforms, so JNI is not really an option.
I have read about solutions where people alternate the window icon between the regular and inverse colour version every x00ns.

Are there any other alternatives I haven't considered?