title: Java Swing - Get X,Y From CLick
body: <pre><code>public class cPan extends JPanel implements ActionListener{
      @Override
      public void actionPerformed(ActionEvent arg0) {
  
  
      }
  }
  </code></pre>
  
  <p>I have the above code which catches actions from within my JPanel. </p>
  
  <p>Im confused about how i would get an x,y cordinate from within my JPanel e.g. where i click</p>
  
  <p>So if i click on 100,200 (x,y) i would like to be able to see this.</p>
  
  <p>I've look the function givens from arg0 but cant find anything useful.</p>
  
  <p>Where am i going wrong?</p>