I just want to point out two additional practices to consider, for being able to track the source of an event. Maybe you are already aware of them.
One method is to make a unique MouseListener for each button. It’s not too bad, in terms of having to write so many Listeners, if you make each one an anonymous method directly attached to its “MenuButton” or whatever you are creating.
The second method is to assign an ActionCommand to your MenuButton.
myMenuButton.setActionCommand(identifyingString);
And then, in the common Listener being used for all the Events, extract the ActionCommand from the Event, and use that (perhaps in a Select Case structure) to choose what to do.
Testing for coordinates is a neat method, and one I’ve seen used in a code sample from my “Core Java” book. It should work for objects that have coordinates and a dimension. But if your object is being positioned via a LayoutStrategy, it might not be the easiest thing to implement.