🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.api
Article #1676

Re: String size (In pixels)

#1676
From: John Baker
Date: Wed, 31 Oct 2001 13:02
25 lines
1408 bytes
Use a FontMetrics object from the current graphics...

Hanan Hermon <hananh@radcom.co.il> wrote in message
news:3bdff245$1_1@dnews...
> Hi,
>
> How can I get the size of a string in pixels ?
>
> I'm writing a report and I would like to the width and height of each
column
> and row do
> the text that I will print will not be cutoff.
>
> I would like to write methods that returns the max width\height of a
string
> array:
>
> maxWidth = getMaxWidth(String[] stringList);
> maxHeight = getMaxHeight(String[] stringList);
>
> Thanks in advance,
>
> Hanan Hermon,
>
>
Technical Details
Message-ID: <3bdff386_1@dnews>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!supernews.com!newsfeed.direct.ca!look.ca!newsfeed.wirehub.nl!PeerFeed.KWeb.on.ca!dnews
References: <3bdff245$1_1@dnews>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 1089d0,e6a73eda7142ac0f
X-Google-Attributes: gid1089d0,public
X-Google-ArrivalTime: 2001-10-31 04:59:49 PST
From: "John Baker" <jbaker@SoftComms.com>
Newsgroups: borland.public.jbuilder.java.api
References: <3bdff245$1_1@dnews>
Subject: Re: String size (In pixels)
Date: Wed, 31 Oct 2001 13:02:03 -0000
Lines: 27
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.00.2314.1300
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300
NNTP-Posting-Host: 217.134.218.40
Message-ID: <3bdff386_1@dnews>
X-Trace: dnews 1004532614 217.134.218.40 (31 Oct 2001 04:50:14 -0800)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!supernews.com!newsfeed.direct.ca!look.ca!newsfeed.wirehub.nl!PeerFeed.KWeb.on.ca!dnews