title: How to check if the current Java application is in foreground on my Windows PC?
body: <p>I want to check if my swing application is in the the foreground. If that's not the case I would use the application's system tray icon to display balloon notifications for some specific events. Any ideas on how to check that?</p>