Re: Fixed size font
- From: "Mary Walker" <mary@xxxxxxxxxxxxx>
- Date: Thu, 28 Jul 2005 16:42:13 +0100
"Thomas Weidenfeller" <nobody@xxxxxxxxxxxxxxxx> wrote in message
news:dc7f91$h57$1@xxxxxxxxxxxxxxxxxxxxxxxxx
> 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/
Thanks. That worked fine,
regards,
Mary
.
- References:
- Fixed size font
- From: Mary Walker
- Re: Fixed size font
- From: Thomas Weidenfeller
- Fixed size font
- Prev by Date: Focus Issue with regards to JTable
- Next by Date: Re: Splash Screen Woes or Why doesn't setVisible(true) protect from setVisible(false)
- Previous by thread: Re: Fixed size font
- Next by thread: printing big Graphics2D & memory?
- Index(es):
Relevant Pages
|