Issues with ActionListener (Java)
===

I am trying to implement action listener on two buttons in JFrame, but the issue is one of the two button is performing both the functions; but i've not configured it to do so. Please find the sample code:-

   

  

    import javax.swing.*;
    import java.awt.event.*;
    import java.awt.*;

    public class MyChangingCirlce implements ActionListener{
   	JButton colorButton, labelButton;
	JLabel myLabel;
	MyDrawPanel mdp;
	JFrame frame;
       public static void main(String [] args)
       {
		MyChangingCirlce mcc = new MyChangingCirlce();
		mcc.createFrame();
       } 

      public void createFrame()
      {
 	frame = new JFrame();
	JButton colorButton = new JButton("Changing Colors");
	JButton labelButton = new JButton("Change Label");
	myLabel = new JLabel("BA");
	mdp = new MyDrawPanel();

	frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
	

	frame.getContentPane().add(BorderLayout.CENTER, mdp);	
	frame.getContentPane().add(BorderLayout.SOUTH,colorButton);	
	frame.getContentPane().add(BorderLayout.EAST,labelButton);	
	frame.getContentPane().add(BorderLayout.WEST,myLabel);
	colorButton.addActionListener(this);
	labelButton.addActionListener(this);	
	frame.setSize(300,300);
	frame.setVisible(true);
	
      } // end of createFrame Method


   	public void actionPerformed(ActionEvent e)
	{
	if(e.getSource()== colorButton)
	{
	frame.repaint();		
	}
	else
	{
	myLabel.setText("AB");
	}

	}	//end of interface method...


}


    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;

    public class MyDrawPanel extends JPanel{

	public void paintComponent(Graphics g)
	{
		int red = (int) (Math.random() * 255);
		int green = (int) (Math.random() * 255);
		int blue= (int) (Math.random() * 255);
		Color randomColor = new Color(red,green,blue);
		g.setColor(randomColor);
		g.fillOval(20,70,100,100);
	}
}