Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I flash the Windows taskbar using Swing?

I'm developing a Swing application and I need to flash the Windows taskbar. I can't use frame.requestFocus() because I don't want to steal focus from any other application.

like image 929
Rob Mayhew Avatar asked Jan 28 '09 20:01

Rob Mayhew


2 Answers

I don't know if it applies to newer versions of Windows, but the .toFront() method used to flash the window if none of the current VM's windows were in the foreground.

This means that calling frame.toFront() on a minimized frame would always make it flash...

like image 105
Powerlord Avatar answered Sep 24 '22 15:09

Powerlord


JNIWrapper with its winpack extension can do what you want.

The Demo on the site shows it in action.

like image 44
Allain Lalonde Avatar answered Sep 23 '22 15:09

Allain Lalonde