🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.swing
Article #679

Jlabel and HTML formatted text

#679
From: Katerina K.
Date: Mon, 17 Jan 2005 14:18
21 lines
1511 bytes
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: <41ebc94b$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news.glorb.com!logbridge.uoregon.edu!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Thread: 111d45,d22a0ad4d3ada954,start
X-Google-Attributes: gid111d45,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Katerina K." <scorpio_gemini@hotmail.com>
Newsgroups: borland.public.jbuilder.java.swing
Subject: Jlabel and HTML formatted text
Date: Mon, 17 Jan 2005 15:18:52 +0100
Lines: 23
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2527
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2527
X-RFC2646: Format=Flowed; Original
NNTP-Posting-Host: 129.132.68.93
Message-ID: <41ebc94b$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1105971531 129.132.68.93 (17 Jan 2005 06:18:51 -0800)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news.glorb.com!logbridge.uoregon.edu!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail