TableColumn « JTable « Java Swing Q&A





1. JTable and TableColumn    coderanch.com

Hi, There has to be a very simple answer to this. I have 4 columns in my JTable and I want them all to start with differing widths. But I want them all to be resizable to any width after startup. ... JTable table = new JTable(model); TableColumn col; col = table.getColumn("Wire"); col.setMaxWidth(50); col = table.getColumn("Time"); col.setMaxWidth(80); col = table.getColumn("Headline"); col.setPreferredWidth(400); ...