Article View: borland.public.jbuilder.java.swing
Article #680Re: Jlabel and HTML formatted text
From: Kevin Dean [TeamB]
Date: Mon, 17 Jan 2005 15:09
Date: Mon, 17 Jan 2005 15:09
37 lines
2325 bytes
2325 bytes
That would probably be because "justify" typically works only on every line
but the last one in a paragraph (try it in a word processor to see what I
mean). Since your text is only one line long, the "justify" option won't
apply.
--
Kevin Dean [TeamB]
Dolphin Data Development Ltd.
http://www.datadevelopment.com/
Please see Borland's newsgroup guidelines at
http://info.borland.com/newsgroups/guide.html
"Katerina K." <scorpio_gemini@hotmail.com> wrote in message
news:41ebc94b$1@newsgroups.borland.com...
> Hello!
> I have read that I can use HTML in components like JLabel in order to
> change the formatting of the text.
>
> So I write something like this:
>
> JLabel questionText = new JLabel();
> questionText.setText("<html> <p style=\"text-align: justify\"> " + "My
> multiline text here...");
>
> I expect that this will make my text "justified". Instead it looks like it
> is "centered". I have also tried with the other possible values for
> text-align (left, right, center) and all three of them work as expected.
> Java seems to ignore only "justify".
> Any idea why this is happening?
>
> I am using JBuilderX Enterprise with java version 1.4.2_01-b06.
>
>
> Thanks a lot!
> Katerina
>
Technical Details
Message-ID:
<41ebd546@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news.glorb.com!dedekind.zen.co.uk!zen.net.uk!demorgan.zen.co.uk!194.72.9.35.MISMATCH!news-peer1!btnet-feed3!news-peer0-test!news-peer-test!btnet!newsfeed.bt.es!caladan.landsraad.net!newsgroups.borland.com!not-for-mailReferences:
<41ebc94b$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 111d45,d22a0ad4d3ada954 X-Google-Attributes: gid111d45,public X-Google-Language: ENGLISH,ASCII-7-bit From: "Kevin Dean [TeamB]" <NkOdSePaAnM@datadevelopment.com> Newsgroups: borland.public.jbuilder.java.swing References: <41ebc94b$1@newsgroups.borland.com> Subject: Re: Jlabel and HTML formatted text Date: Mon, 17 Jan 2005 10:09:54 -0500 Lines: 39 Organization: Dolphin Data Development Ltd. X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.2527 X-RFC2646: Format=Flowed; Response X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2527 NNTP-Posting-Host: 24.57.153.235 Message-ID: <41ebd546@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1105974598 24.57.153.235 (17 Jan 2005 07:09:58 -0800) X-Authenticated-User: kdean Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news.glorb.com!dedekind.zen.co.uk!zen.net.uk!demorgan.zen.co.uk!194.72.9.35.MISMATCH!news-peer1!btnet-feed3!news-peer0-test!news-peer-test!btnet!newsfeed.bt.es!caladan.landsraad.net!newsgroups.borland.com!not-for-mail