I have calss JPButton that extends JButton. It basically is a graphical button that shifts 1 pixel to the right and down when mousePressed(), and shifts back when mouseReleased(). Both of those functions are Overriden obviously. The question I have is that I'm trying to have a keypress mimick the Mouse action. I attempted to do this by Overriding doClick(). Doesn't seem to work. Is there a preferred way to do this?