changed from PopupMenuListener to MenuListener for Mac OS X
compatibility