Below I have the following code, so that when someone clicks on the \"Close\", the window will close. Below that is another exit button on the same menu bar, simply for redundan
Note: You dont have to write 'implements MouseListener' during class definition.
For more information, search for adapter classes, more specifically for MouseAdapter class.