If you add a MouseListener to a JPanel that has an image for instance, that JPanel will "know" when it is being clicked since its mouse listener will only be activated if this in fact happens. In this situation, there's no need to keep track of numerical coordinates.
Also in regards to the mouseListener class , instead of having to keep track of the numerical coordinate point the user clicked, is there a way I can get the event in terms of which panel it clicked? (Like with a radio button listener, we determine the action event in terms of the name we gave to the button. Can we do this for panels and mouseClicked events?)