How to display the contents in an array by using mouseListener?
问题 I'm doing a program in which there are 8 shapes contained in an array that will be displayed when you click the mouse. I am new to Java and not that familiar with event handlers and listeners. I am trying to make the shapes appear at the location the mouse is clicked at inside the frame yet I am having trouble since the constructor of each shape use 2 Points as its parameter. Here's an example from the code: import MyLibs.Circle; import MyLibs.Rectangle; import MyLibs.Shape; import java.awt