I'm sorry, apparently the x and y values are public. You don't need to use getters but you can use this:
this is all deprecated code by the way. In case of the 4k competition you can still use this (because it requires less code this way) but in other applications I recommend using mouseListener and mouseMotionListener.
The code I gave for the button doesn't work with the old events either. In order to differentiate between mouse buttons you need to check e.modifiers.
if (e.modifiers == 0) if (e.modifiers == Event.ALT_MASK if (e.modifiers == Event.META_MASK
Unfortunately, this method counts pressing the left button while holding the alt key as pressing the middle mouse button. If that's a problem, you'll need to use the newer listeners.