File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Swing / AWT / SWT and the fly likes JTable column width Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "JTable column width" Watch "JTable column width" New topic

JTable column width

Rajeshwari Ramamurthi

Joined: Jun 21, 2001
Posts: 28
I have a JTabel with 8 columns. I want to set the column width dynamically for each column to fit the biggest string(in lengthwise) of that column. Is it possible to calculate the width of each column, if I calculate the length of biggest string for each column.
Or is it possible to display all cell contents fully.

I agree. Here's the link:
subject: JTable column width
It's not a secret anymore!