swt - How to set the width of a table column? -


i trying set width of columns in code bellow not change. wrong code?

    table_2 = new table(shell, swt.check | swt.border | swt.v_scroll | swt.single | swt.full_selection | swt.h_scroll);     table_2.setbounds(321, 47, 85, 98);      table_2.setlinesvisible(true);     tablecolumn tbl2_tc1 = new tablecolumn(table_2,swt.none);     tablecolumn tbl2_tc2 = new tablecolumn(table_2,swt.none);     tbl2_tc1.setwidth(120);     tbl2_tc1.pack();     tbl2_tc2.setwidth(40);     tbl2_tc2.pack();     table_2.pack(); 

don't call tablecolumn.pack() resets column size 'preferred size' - not 1 set setwidth.


Comments

Popular posts from this blog

javascript - Using jquery append to add option values into a select element not working -

Android soft keyboard reverts to default keyboard on orientation change -

Rendering JButton to get the JCheckBox behavior in a JTable by using images does not update my table -