🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: JTable cell formatting

#11643
From: Robb Shecter
Date: Tue, 04 May 1999 00:00
19 lines
1262 bytes
Mike Wolterink wrote:

> Hello,
>
> I want to 'format' my Double that I put in the JTable,
> i.e.:   400.3000000  becomes 400.3 (I don't want that !!!)
> I want to give a precision to the Double (400.30).

(Crosspost to c.l.j.p. removed.)

Isn't the correct way to display some information in a particular way to
make your own cell renderer?  You can write a renderer that handles Double
types in whatever way you like.  You then instantiate one, and give it to
the JTable along with the type "Double", so that it knows to use it
whenever displaying a Double object.

??

- Robb
Technical Details
Message-ID: <372EED79.59D10008@darmstadt.gmd.de>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <7gmp1e$opi$1@news.worldonline.nl>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 111d45,61d4beeaae1dc2c3
X-Google-Attributes: gid111d45,public
X-Google-Thread: 10fd6d,61d4beeaae1dc2c3
X-Google-Attributes: gid10fd6d,public
From: Robb Shecter <shecter@darmstadt.gmd.de>
Subject: Re: JTable cell formatting
Date: 1999/05/04
Message-ID: <372EED79.59D10008@darmstadt.gmd.de>
X-Deja-AN: 473894531
Content-Transfer-Encoding: 7bit
References: <7gmp1e$opi$1@news.worldonline.nl>
X-Accept-Language: de, en, fr
Content-Type: text/plain; charset=us-ascii
Organization: GMD, Sankt Augustin, Germany
Mime-Version: 1.0
Newsgroups: borland.public.jbuilder.java.swing,comp.lang.java.gui