aspose file tools
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes field length Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Groovy Fundamentals video training course this week in the Groovy forum!
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "field length" Watch "field length" New topic

field length

Shengzhi Peng

Joined: Jun 16, 2005
Posts: 10
May i know how to specify the length of a column?
because some field is long,but some is short.I want to make the JTable just contain the column.
Thank you.
Ta Ri Ki Sun
Ranch Hand

Joined: Mar 26, 2002
Posts: 442
I got the schema/generic columns from the controller, then got the column's max length from the column's as I iterated, and finally set the tableColumn's preferredWidth to maxLength X 3
It is sorta covered in the JavaRanch Style Guide.
subject: field length