title: Hide a column in JTable
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/1492217/how-to-make-a-columns-in-jtable-invisible-for-swing-java">How to make a columns in JTable Invisible for Swing Java</a><br>
    <a href="https://stackoverflow.com/questions/12195973/how-to-hide-a-particlar-column-in-defaulttablemodel-from-displaying-it-in-table">How to hide a particlar column in DefaultTableModel from displaying it in table?</a>  </p>
  </blockquote>
  
  
  
  <p>I am trying to enter data to three columns in JTable, but I want to show only two columns. Actually, I want to hide the third column, not by setting the width to 0, but by any other method in which I can get the data from the hidden column on a click event.</p>
  
  <p>How can I hide a column in this manner?</p>
  
  <p>I am using the following code:</p>
  
  <pre><code> try {
       String Title[]= new String{"a","b","c"};
       Object obj= new Object[50][3];
       JTable table= new JTable(obj,title);
       JScrollPane jsp= new JScrollPane(table); 
       add(jsp);
   } catch(Exception ex) {
       ex.printStackTrace();
   }
  </code></pre>