• Post Reply Bookmark Topic Watch Topic
  • New Topic

setting a particular column width and rest should be of default size..  RSS feed

Mohammed Ajmal
Posts: 29
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

I need to to fix the width of a particular column with some predefined size and it should be resizable while other columns widths should be resizable.

I tried by using

//It resizes all columns

// To resize a particluar column
int vColIndex = 1;
javax.swing.table.TableColumn tableColumn = tableActivePlans.getColumnModel().getColumn(vColIndex);
int width = 20;

But here the other columns are not of default size and scroll bar is getting created and last columns are getting minimum size,which will happen. But I need rest columns to be of same size.

It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!