Added code on the mousePressed listener.