File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Varying Table column width !

 
Shivaji Bhosale
Ranch Hand
Posts: 70
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am creating a table. Individual Column widths are varying. So is there anyway
when row is getting displayed column with is adjusted automatically for changing width?
waiting impatiently ...
 
eric moon
Ranch Hand
Posts: 133
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You need to override getColumnWidth. Here's how I did it. Whenever I call fireTableDataChanged() I make a call to setColumnWidths():

If you want the table to fit its contents you can put some code like this in your table:



[This message has been edited by eric moon (edited November 06, 2001).]
 
Don't get me started about those stupid light bulbs.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic