File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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
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
I agree. Here's the link:
subject: field length
It's not a secret anymore!