The BufferedImage
is a class that supports general image manipulation. It can be used equally from interactive programs with a graphical user interface, and from non-interactive batch processing programs with no user interface. Having a mouse listener on something that is not used in a GUI does not make sense, so you can't add a MouseMotionListener
to a BufferedImage
.
You should add the listener to the GUI component that is showing the image instead.