Re: JTextArea text is double-spaced?

Discussion in 'Java' started by bad_knee, Jul 13, 2003.

  1. bad_knee

    bad_knee Guest

    (bad_knee) wrote in message news:<>...
    > Hello,
    > I've been using append() to add text to a JTextArea component,
    > but the text ends up looking double-row-spaced when drawn.
    > Is there a way to get single-spaced rows of text with the JTextArea
    > component?
    >
    > Thanks


    (in reply to thread..)

    Thanks for the replies, but nope. I'm not using a dos/windows file
    with 0x0a/0x0d combination. I've been all through the code and,
    can't find any double linefeeds. If you look at the screenshot below,
    you can see that hiliting the text with the mouse shows that each
    line of text is just taking up that much space.. not really two lines.

    I am running under Linux Mandrake 9.1 and sun j2sdk1.4.1 if that
    makes any difference. I'm thinking now it might be something
    strange with KDE or the font server.

    oh well, fwiw.. heres the screendump
    http://www.angelfire.com/jazz/ipwhore/scrshot.jpg

    Thanks,
    bl8n8r
     
    bad_knee, Jul 13, 2003
    #1
    1. Advertising

  2. bad_knee

    Sudsy Guest

    bad_knee wrote:
    > (bad_knee) wrote in message news:<>...
    >
    >>Hello,
    >>I've been using append() to add text to a JTextArea component,
    >>but the text ends up looking double-row-spaced when drawn.
    >>Is there a way to get single-spaced rows of text with the JTextArea
    >>component?
    >>
    >>Thanks

    >
    >
    > (in reply to thread..)
    >
    > Thanks for the replies, but nope. I'm not using a dos/windows file
    > with 0x0a/0x0d combination. I've been all through the code and,
    > can't find any double linefeeds. If you look at the screenshot below,
    > you can see that hiliting the text with the mouse shows that each
    > line of text is just taking up that much space.. not really two lines.
    >
    > I am running under Linux Mandrake 9.1 and sun j2sdk1.4.1 if that
    > makes any difference. I'm thinking now it might be something
    > strange with KDE or the font server.
    >
    > oh well, fwiw.. heres the screendump
    > http://www.angelfire.com/jazz/ipwhore/scrshot.jpg
    >
    > Thanks,
    > bl8n8r


    Looks like your leading is fat. You need to check the font
    parameters. Look at FontMetrics.getLeading(). It just might
    be a feature of the font you've selected.
    Two notes: there's no setLeading method, and the term
    "leading" came from the old Linotype days. Operators could
    control the amount of lead which flowed between set lines
    of type. Ain't history wonderful?
     
    Sudsy, Jul 14, 2003
    #2
    1. Advertising

  3. bad_knee

    bad_knee Guest

    Sudsy <> wrote in message news:<>...
    > Looks like your leading is fat. You need to check the font
    > parameters. Look at FontMetrics.getLeading(). It just might
    > be a feature of the font you've selected.
    > Two notes: there's no setLeading method, and the term
    > "leading" came from the old Linotype days. Operators could
    > control the amount of lead which flowed between set lines
    > of type. Ain't history wonderful?


    thanks. yes, history is a wonderful diversion from that which grinds at
    the base of the cerebrum ;) Thanks for the info, after looking for
    getLeading() on sun, I found something on it. Still.. read only.

    http://java.sun.com/j2se/1.4.1/docs/api/java/awt/FontMetrics.html

    PS: changing fonts made no difference either.
    http://www.angelfire.com/jazz/ipwhore/scrshot2.jpg
     
    bad_knee, Jul 14, 2003
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. VB Programmer

    HTML seems double-spaced

    VB Programmer, Jun 9, 2004, in forum: ASP .Net
    Replies:
    4
    Views:
    4,655
    Kevin Spencer
    Jun 9, 2004
  2. bad_knee
    Replies:
    0
    Views:
    524
    bad_knee
    Jul 13, 2003
  3. Thomas Weidenfeller

    Re: JTextArea text is double-spaced?

    Thomas Weidenfeller, Jul 16, 2003, in forum: Java
    Replies:
    2
    Views:
    453
    Thomas Weidenfeller
    Jul 17, 2003
  4. Sydex
    Replies:
    12
    Views:
    6,508
    Victor Bazarov
    Feb 17, 2005
  5. Michal Mikolajczyk
    Replies:
    0
    Views:
    661
    Michal Mikolajczyk
    Feb 13, 2004
Loading...

Share This Page