Skip to Main Content

Java SE (Java Platform, Standard Edition)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Column Hide in JTable

843806Aug 17 2009 — edited Aug 18 2009
Hi There,

We are using Jtable to show data using DefaultTableModel. Now we have to implement some hidden columns in this existing JTable.
For this we have tried many ways but not succeeded.
1. We have use width=0 and setting header caption ="" but it shows column with some width insteed of being hidden.

2. further we tried dtm.setColumnCount(numCols) to set required number of columns to be displayed and it does so but ignore the rest columns. So this way is not useful as well.

Please suggest us how to implement hidden columns in JTable ?



Thanx in Adv,
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 15 2009
Added on Aug 17 2009
7 comments
1,377 views