🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.swing
Article #12824

Re: Fit JTable columns to the size of its contents

#12824
From: Max Polk
Date: Wed, 04 Nov 1998 00:00
9 lines
865 bytes
> does anybody knowns how to autoresize a JTables columns to fit the size
> of its content?

A JTable is very "dumb" concerning the data it is displaying.  Basically 
it does a toString on the Object to display.  Nowhere does it try to 
determine how long the String representation of the Object is.

You have to know yourself how long the data is, then manually set the 
column widths yourself.
Technical Details
Message-ID: <MPG.10aa3e368999dd9b9896ac@forums.borland.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <363F1711.1613955C@cimag.de>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 111d45,5bc05f5a6a316c44
X-Google-Attributes: gid111d45,public
From: none@none.com (Max Polk)
Subject: Re: Fit JTable columns to the size of its contents
Date: 1998/11/04
Message-ID: <MPG.10aa3e368999dd9b9896ac@forums.borland.com>
X-Deja-AN: 408319258
References: <363F1711.1613955C@cimag.de>
Organization: Another Netscape Collabra Server User
Newsgroups: borland.public.jbuilder.java.swing