Login or Sign Up
Logging in...
Remember me
Log in
Or
Sign Up
Forgot password or user name?
Log in with
Search in titles only
Search in Java only
Search
Advanced Search
Forums
BYTES
Product Launch
Updates
Developer Toolkit
Member List
Calendar
Today's Posts
Home
Forum
Topic
Java
How To Calculate TextWidth?
How To Calculate TextWidth?
Collapse
X
Collapse
Posts
Latest Activity
Photos
Page
of
1
Filter
Time
All Time
Today
Last Week
Last Month
Show
All
Discussions only
Photos only
Videos only
Links only
Polls only
Events only
Filtered by:
Clear All
new posts
Previous
template
Next
kiberg
New Member
Join Date:
Jul 2007
Posts:
12
#1
How To Calculate TextWidth?
Oct 30 '07, 07:05 AM
Hi
Code:
Graphics g; g.drawString("Hello World!", 10, 10);
I don't know it what kind of wide the text.How to calculate it?
ThAnKs!
r035198x
MVP
Join Date:
Sep 2006
Posts:
13225
#2
Oct 30 '07, 07:23 AM
Originally posted by
kiberg
Hi
Code:
Graphics g; g.drawString("Hello World!", 10, 10);
I don't know it what kind of wide the text.How to calculate it?
ThAnKs!
The size of the text is determined by the current Font set for the graphics context.
See the
specs
for how to get the Font and FontMetrics.
Comment
Post
Cancel
Previous
template
Next
Working...
OK
OK
Cancel
👍
👎
☕
Comment