• Post Reply Bookmark Topic Watch Topic
  • New Topic

Column width

 
Lukasz Kaleta
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How change column width. J wont to set first column at 100, secend ad 200 and third at rest
 
Lukasz Kaleta
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
/**This method should be called to set the column
*at pColumn index to a width of pWidth.
*/
public void setColumnWidth(int pColumn, int pWidth){
//Get the column model.
TableColumnModel colModel = getColumnModel();
//Get the column at index pColumn, and set its preferred width.
colModel.getColumn(pColumn).setPreferredWidth(pWidth);
}

that was easy
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!