Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > Re: JTextArea text is double-spaced?

Reply
Thread Tools

Re: JTextArea text is double-spaced?

 
 
bad_knee
Guest
Posts: n/a
 
      07-13-2003
http://www.velocityreviews.com/forums/(E-Mail Removed) (bad_knee) wrote in message news:<(E-Mail Removed) om>...
> 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
 
Reply With Quote
 
 
 
 
Sudsy
Guest
Posts: n/a
 
      07-14-2003
bad_knee wrote:
> (E-Mail Removed) (bad_knee) wrote in message news:<(E-Mail Removed) om>...
>
>>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?

 
Reply With Quote
 
 
 
 
bad_knee
Guest
Posts: n/a
 
      07-14-2003
Sudsy <(E-Mail Removed)> wrote in message news:<(E-Mail Removed)>...
> 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/...ntMetrics.html

PS: changing fonts made no difference either.
http://www.angelfire.com/jazz/ipwhore/scrshot2.jpg
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
JTextArea & color text vertigo Java 2 04-09-2004 10:17 AM
Aligning text within a JTextArea Phillip Java 2 01-23-2004 04:03 PM
JTextArea: get last line of text Aaron Boxer Java 3 09-30-2003 01:34 PM
Re: JTextArea text is double-spaced? Thomas Weidenfeller Java 2 07-17-2003 03:06 PM
Re: JTextArea text is double-spaced? bad_knee Java 0 07-13-2003 10:24 PM



Advertisments