title: Java button actions in multiple classes
body: <p>Working in Java: I have a <code>JFrame</code> class, and separate classes for my two <code>JPanels</code> that are added to the <code>JFrame</code>.  One of the <code>JPanel</code> classes has some buttons in it, which can interact with each other(when I click on one button, it can disable another button).  However, I can't figure out how to get the button to call a method in the other <code>JPanel</code> (written in a separate class).  </p>
  
  <p>So, my program look like this:</p>
  
  <p>JFrame</p>
  
  <ul>
  <li>Jpanel1</li>
  <li>Jpanel2 - This class has my buttons in it, I'm trying to get them to interact with the JPanel1 object.</li>
  </ul>
  
  <p>Any tips appreciated, thanks!</p>