tldr; How do you use a MouseEvent on a JFrame object(specifically JLabel) to update the displayed image in the JFrame I am trying to create a program where an image is broken into tiles and on click of one of those tiles, the program moves the tile to the open space in the image. (See Sliding Puzzle for more information).