• Post Reply Bookmark Topic Watch Topic
  • New Topic

How to make all the columns filling the space of their JTable automaticly?

 
Jevon Wang
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello all,
There is a panel.
I have to switch a label and a ScrollPane which contains a JTable.
The problem is that every time I sweep the label from the panel and add the JScrollPane with the JTable to the Panel, the JTable's columns won't fill the space of their table.
Those columns keep the same width. It seems that they have the some default width.
But When I resize the Frame or I make the Frame filling the screen, those columns will filling the Table themself. Next time when I sweep the label and add the Scrollpane to the panel angain these columns won't fill again.
I don't know if there is some simple may to make sure those columns filling the their table automaticly. :roll:
Thanks a lot.
[ June 06, 2002: Message edited by: Jevon ]
[ June 07, 2002: Message edited by: Jevon Wang ]
 
Dirk Schreckmann
Sheriff
Posts: 7023
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to JavaRanch!
We ain't got many rules 'round these parts, but we do got one. Please change your display name to comply with The JavaRanch Naming Policy.
Thanks Pardner!
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!