- Code: Select all
//设置列宽
for (int i = 0; i < table.getRows().getCount(); i++) {
table.get(i,0).setCellWidth(80f,CellWidthType.Point);
table.get(i,1).setCellWidth(160f,CellWidthType.Point);
}
//固定列宽
table.autoFit(AutoFitBehaviorType.Fixed_Column_Widths);
80f 代表什么意思,当字段很多的时候,如何分配大小来填充word界面,现在我的表格有13个字段,想要设置固定列宽,发现很难调整