🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

can i have several different formats for the Double class in a JTable?

#8175
From: Zachary Cooper
Date: Fri, 20 Oct 2000 00:00
9 lines
1062 bytes
I have a custom cell renderer and cell editor for a JTable
that displays columns of Double classes with 5 decimal
places.  I now want to have 3 different formats for Double
types in the table, one showing 2 places, one showing 3
places, and one showing 5 places.  Since the
JTable.setDefaultRenderer() method set a renderer for
each class type, what's the best way to so this?
Will extending the Double class to 3 'dummy' extensions
and then implementing a renderer for each work?
Technical Details
Message-ID: <39f0e774$1_1@dnews>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 111d45,8fe3c7e5c7b153f6,start
X-Google-Attributes: gid111d45,public
From: "Zachary Cooper" <ztc@bigfoot.com>
Subject: can i have several different formats for the Double class in a JTable?
Date: 2000/10/20
Message-ID: <39f0e774$1_1@dnews>
X-Deja-AN: 684003492
X-Trace: 20 Oct 2000 17:46:44 -0800, 151.202.69.70
X-MSMail-Priority: Normal
X-Priority: 3
Reply-To: "Zachary Cooper" <ztc@bigfoot.com>
Newsgroups: borland.public.jbuilder.java.swing
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400