Hi!!
I have created JTable with fixed no of rows and columns.Then depending upon some conditions I want to hide one column,but the methods removeColumn or setting maxWidth to 0 are not working.I am not getting any error.
How can I do this?
srs_grp
-1
Light Poster
Recommended Answers
Jump to Posthi, i spend many sleeples nights trying to solve it i did it this way:
first create custom table model like this, and ascribe it to the table:DefaultTableModel tableModel = new DefaultTableModel(null,new String[]{"Column1", "Column2", "Column3"});
then to remove column from view you do
All 2 Replies
Reply to this topic
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.