Changed MouseListener to MouseAdapter.