Re: Fixed size font




"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


.



Relevant Pages

  • Fixed size font
    ... I would like to draw a string to a panel using the Graphics object i.e ... but I would like to be able to wrap a long ... I need a fix sized font where all the characters are the same ...
    (comp.lang.java.gui)
  • Re: Fixed size font
    ... 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). ... the font set seems limitted and I have had no joy getting access to a fix sized font. ...
    (comp.lang.java.gui)
  • RE: Update panel with Gridview control
    ... Regarding on your new questions(deal with empty input parameter of the ... separate panel) on the page. ... Format of the initialization string does not conform ... connectionString, Int32 currentPosition, StringBuilder buffer, Boolean ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Delay during login
    ... > the entries they will appear in the right panel. ... >> Look at the userinit string in the left pane, ... >> Rick Rogers, ... >> Associate Expert - WindowsXP Expert Zone ...
    (microsoft.public.windowsxp.basics)
  • Re: Draw a string on JPanel
    ... > I want to draw a string on JPanel based on user input. ... > in the code to force the repaint. ... you call setText on the panel. ... you do this to a container, the container also needs to be revalidated. ...
    (comp.lang.java.programmer)