1. for the class with the JButton put "implements MouseListener" after it says "extends JPanel" and import the mouse listener class
2. in the constructor write, this.addMouseListener(this); and for...