views:

27

answers:

0

Hi,

I'm writing a presentation app which is supposed to present on the 2nd display in extended mode.

For that I want to have a "Start presentation" button which reflects the actual state of external display connections: it should be gray and non-clickable if no external displays are connected. And it should be enabled if there is at least one connected.

I have seen the GraphicsEnvironment class but it only has getXXX methods. It's inefficient because I will have to check the state every few seconds and the state updates not immediately.

Is there a callback method on display connection or something like that for this purpose?

Thanks

Shuo