views:

56

answers:

2

If a JFrame has a JDialog modal open, the JDialog is animated (the borders and title bar have a lighter colour) if any other part of the application is clicked other than the JDialog with focus. The user is made aware of the window in focus to attend to first.

I have a Swing application with custom dialogs, setUndecorated(true) and custom title bars.

Is it possible to implement the behaviour described above for these custome dialogs?

+2  A: 

This flashing is done by the window manager, Java doesn't even get called so there's nowhere to hook into. It is platform specific too - on Linux I can grab the underlying frame and move it around - there's no animation.

Keilly
A: 

instead of blinking the window, i used a lighter color on the glass pane when the dialog is open.

n002213f