🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.language
Article #20121

Re: Formatting float output

#20121
From: Joe Nuxoll
Date: Fri, 24 Oct 1997 00:00
16 lines
978 bytes
Angus M. Fraser wrote:
> I'd like to display the value of a float in a textField to only 2
> decimals place but I can't see any obvious way of doing it.
> I'd like 1.23456 to be shown as 1.23 for example.
> Can anyone point me in the right direction?

borland.jbcl.control.FieldControl

Use this guy, hook it up to a DataSet with a float type column - and set
the displayMask property on the column.  The FieldControl will handle
the rest...

Look in the jbcl newsgroup for several threads on this topic...

 - Joe Nuxoll
Technical Details
Message-ID: <34511626.948766A3@corp.borland.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <3451136b.2656780@forums.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f74b3,b10a81d316bd276b
X-Google-Attributes: gidf74b3,public
From: Joe Nuxoll <jnuxoll@corp.borland.com>
Subject: Re: Formatting float output
Date: 1997/10/24
Message-ID: <34511626.948766A3@corp.borland.com>
X-Deja-AN: 284672597
References: <3451136b.2656780@forums.borland.com>
Organization: Borland International, Inc.
Newsgroups: borland.public.jbuilder.java.language