title: Getting casting errors with JLabel and JButton
body: <p>I'm making a card game, and the player can either click on the draw button to draw a card or play a card. 
  Problem is, whenever I click draw it gives me casting errors but my cast to <code>JLabel</code> is only if they click on a card.</p>
  
  <p>Error only happens when I click on draw. </p>
  
  <pre><code>public void mousePressed(MouseEvent arg0) 
      {
          double x = MouseInfo.getPointerInfo().getLocation().getX();
          double y = MouseInfo.getPointerInfo().getLocation().getY();
          if(x&gt;=draw.getX()&amp;&amp;x&lt;=draw.getX()+draw.getWidth() &amp;&amp; y&gt;=draw.getY() &amp;&amp; y&lt;=draw.getY()+draw.getHeight())
          {
              //change later so anonymous
              say("\nPlayer "+UNO.getturn()+" drew a "+UNO.getdeckontop());
              UNO.draw();
              UNO.nextturn();
              smalllennie();
              return;
          }
          else
          {
              JLabel label = (JLabel)arg0.getSource();
              int index = currentdeck.indexOf(label);
  </code></pre>
  
  <pre><code>Exception in thread "AWT-EventQueue-0" java.lang.ClassCastException:
    javax.swing.JButton cannot be cast to javax.swing.JLabel  
  at Graphic.mousePressed(Graphic.java:146)
  </code></pre>