windowlistener

Q about Java WindowListener

If you have a WindowListener, will a windowDeactivated(WindowEvent) event always occur whenever a window is closed, or is it possible for a windowClosing(WindowEvent) to occur without a windowDeactivated(WindowEvent) occurring. That is, is window deactivation a part of window closing? Finally, will a windowClosed(WindowEvent) always (n...

Why do I get a Null Pointer Exception?

I have this code: Manager manager = new Manager("Name"); MyWindowListener windowListener = new MyWindowListener(); manager.addWindowListener(windowListener); Eclipse writes that I have a NullPointerException in the last line. What can be the reason for that. I do have constructors in the Manager and MyWindowListener. If it's importa...

Desktop app noob question: best cross-platform library that can listen for window-change events (focus, lose focus, etc)?

Hello, I've only ever done server, web, and database programming, never any desktop programming. I now want to learn and have a small project I want to attempt, but am not sure which library/framework to use. I'd like to create a small cross-platform app that runs in the system tray (and whatever the OSX equivalent is), and listens for...