JTable assigning default column widths problem  
Author Message
danb





PostPosted: 2003-8-20 18:19:00 Top

java-programmer, JTable assigning default column widths problem "Richard Morris" <email***@***.com> wrote in message news:<jgw0b.813144$email***@***.com>...

>
> tblNames.getColumn("Active").setPreferredWidth(40);
> tblNames.getColumn("First Name").setPreferredWidth(150);
> tblNames.getColumn("Last Name").setPreferredWidth(150);
>


try this:
tblNames.getColumnModel().getColumn("Active").setPreferredWidth(40);
or
tblNames.getColumnModel().getColumn(0).setPreferredWidth(40);


-Dan
email***@***.com