Article View: borland.public.jbuilder.java.swing
Article #7611Re: Wrapping the text of a label
From: Nabin Thomas
Date: Mon, 08 Jan 2001 02:48
Date: Mon, 08 Jan 2001 02:48
68 lines
2795 bytes
2795 bytes
This is a multi-part message in MIME format. --------------CBDED4A4A625325CB0E7272B Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Use JTextArea with setEditable(false); the appearance can be made similar to that of label by setting the border to null and by setting the colors Hilde Lehmann wrote: > Yes but what I need is automatic wrapping not multiple lines, just like a > JTextArea or JEditorPan. > Any Idea? > Thanks > Hilde Lehmann > Khurram Shakir wrote: > > > Swing supports HTML based Labels, its mean if you want multiline label, you > > can write complete HTML in Label text. > > > > e.g. let say you want to write a word like > > > > Hello from Java > > > > And Hello from Jbuilder > > > > (this is two line text) > > > > Using same label , you can use > > > > String labelText = <html> Hello from Java <br>And Hello from Jbuilder</html> > > > > And put this text into label using its setText method. > > > > Hope this will help. > > > > Regards, > > > > Khurram Shakir > > > > Sun Certified Programmer for Java 2 Platfrom > > > > "Hilde Lehmann" <mole@intercable.net> wrote in message > > news:3A4F4CFD.DF463ADC@intercable.net... > > > Is there any way to wrap a text on a label? > > > > > > Hilde Lehmann > > > --------------CBDED4A4A625325CB0E7272B Content-Type: text/x-vcard; charset=us-ascii; name="email.vcf" Content-Transfer-Encoding: 7bit Content-Description: Card for Nabin Thomas Content-Disposition: attachment; filename="email.vcf" begin:vcard n:Thomas;Nabin x-mozilla-html:TRUE adr:;;;;;; version:2.1 email;internet:DONOTSPAMME.nabinthomas@REMOVETHIShotmail.comANDTHISTOO note;quoted-printable:REMOVE the Capitalised letters in my email ID given in this card=0D=0APlease remember to avoid spam. fn:Nabin Thomas end:vcard --------------CBDED4A4A625325CB0E7272B--
Technical Details
Message-ID:
<3A592A6F.BC3EC015@mailserver.com>Path:
arc1-ca.pugleaf.net!supernews.google.com!sn-xit-03!supernews.com!logbridge.uoregon.edu!newsfeed.wirehub.nl!PeerFeed.KWeb.on.ca!bornews.borland.com!not-for-mailReferences:
<3A4F4CFD.DF463ADC@intercable.net> <3a50779a_2@dnews> <3A51422D.F5616309@intercable.net>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 111d45,b54caeffc11b087f X-Google-Attributes: gid111d45,public X-Google-ArrivalTime: 2001-01-07 19:00:04 PST Path: arc1-ca.pugleaf.net!supernews.google.com!sn-xit-03!supernews.com!logbridge.uoregon.edu!newsfeed.wirehub.nl!PeerFeed.KWeb.on.ca!bornews.borland.com!not-for-mail From: Nabin Thomas <email@mailserver.com> Newsgroups: borland.public.jbuilder.java.swing Subject: Re: Wrapping the text of a label Date: Mon, 08 Jan 2001 08:18:16 +0530 Organization: Another Netscape Collabra Server User Lines: 71 Message-ID: <3A592A6F.BC3EC015@mailserver.com> References: <3A4F4CFD.DF463ADC@intercable.net> <3a50779a_2@dnews> <3A51422D.F5616309@intercable.net> NNTP-Posting-Host: 202.86.153.185 Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------CBDED4A4A625325CB0E7272B" X-Mailer: Mozilla 4.76 [en] (Win98; U) X-Accept-Language: en