Re: Fixed size font
- From: Thomas Weidenfeller <nobody@xxxxxxxxxxxxxxxx>
- Date: Wed, 27 Jul 2005 10:05:52 +0200
Mary Walker wrote:
I would like to draw a string to a panel using the Graphics object (g) i.e g.drawString("Test",150,150); but I would like to be able to wrap a long string around the width of the panel (a bit like a word processor would). For this, I need a fix sized font where all the characters are the same width. However, the font set seems limitted and I have had no joy getting access to a fix sized font.
new Font("Monospaced", PLAIN, 10)
Please see the API documentation for details.
/Thomas -- The comp.lang.java.gui FAQ: ftp://ftp.cs.uu.nl/pub/NEWS.ANSWERS/computer-lang/java/gui/faq http://www.uni-giessen.de/faq/archiv/computer-lang.java.gui.faq/ .
- Follow-Ups:
- Re: Fixed size font
- From: Mary Walker
- Re: Fixed size font
- References:
- Fixed size font
- From: Mary Walker
- Fixed size font
- Prev by Date: Re: TextListener Event
- Next by Date: printing big Graphics2D & memory?
- Previous by thread: Re: Fixed size font
- Next by thread: Re: Fixed size font
- Index(es):
Relevant Pages
|