I would appreciate a very simple how-to on implementing a mouseListener into a DrawingPanel. If I want to return pixels of mouse clicks, for example, how do i do this? Thank you.
I would appreciate a very simple how-to on implementing a mouseListener into a DrawingPanel.
Share
Basically you just add a mouse listener to that drawing panel, there are a lots of tutorials.
And getting coordinates of pixels is just calling
e.getX()ande.getY()methods inmouseClicked(MouseEvent e).