title: How to write a boolean that the frame contains a certain JTable - Java
body: <p>I have a database and I load the data into several JTables. I want to display a row from the active JTable, what my frame contains. But I don't know how to check if my frame contains the <strong>selected / active</strong> JTable. </p>
  
  <p>This is how far I got: </p>
  
  <pre><code> boolean checkTableInFrame(JTable s) {       
       if (frame.getContentPane() == s) {
           return true;
       }
       return false;
   }
  </code></pre>
  
  <p>but this doesn't work. </p>