R
R^3
I would like to change the width of columns in a JTable. I know I have
some working code to do this, but I don't know *where* in Netbeans to
put it, and how to preview it.
Code:
TableColumn tableColumn = jTable1.getColumnModel().getColumn(1);
tableColumn.setMinWidth(240);
tableColumn.setPreferredWidth(240);
tableColumn.setMaxWidth(240);
jScrollPane2.setViewportView(jTable1);
I have tried putting this in the "postcreation code" and the "post
initialization code" but whenever I preview it, there is no change to
the JTable. How can I get this to work?
Ryan
some working code to do this, but I don't know *where* in Netbeans to
put it, and how to preview it.
Code:
TableColumn tableColumn = jTable1.getColumnModel().getColumn(1);
tableColumn.setMinWidth(240);
tableColumn.setPreferredWidth(240);
tableColumn.setMaxWidth(240);
jScrollPane2.setViewportView(jTable1);
I have tried putting this in the "postcreation code" and the "post
initialization code" but whenever I preview it, there is no change to
the JTable. How can I get this to work?
Ryan