Changed from mouseClicked to mousePressed also fixed output