I\'m a bit confused from what I\'ve heard Java doesn\'t do events.
But I know that it does GUI events.
Am I missing something? Does java have an event handli
From what I remember of Java (haven't worked with it in > 6 months), I don't think there are events ala .NET. Your best bet will probably be to make use of the publisher/subscriber pattern. It's pretty easy to implement and pretty reliable.
Swing or AWT, which are the Java UI toolkits, both handle events - check out the official Swing event tutorial for examples. You will need to have written your UI in Swing of course to be able to register listeners for these events.
You might also want to take a look at the open source EventBus library, which, contrarily to the standard publisher/subscriber pattern uses a mediator class (the event bus) in order to reduce the tight coupling required in publisher/subscriber pattern (where subscribers must know about all publishers to register to them, which is not always possible and is often cumbersome).
I have used it in GUI applications but it can deal with any kinds of event.