🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: JLabel font size

#12895
From: Richard Wilkman
Date: Thu, 15 Oct 1998 00:00
73 lines
3134 bytes
There isn't anything you can call on a component that will actually do
what you want in this case.  The change is ultimatly the
responsibility of the layout manager, so doLayout may do the trick. 
This, of course, assumes you are using a non-coordinate based layout
(the behaviour you describe is exactly what something like XYLayout is
supposed to do).

-Rich

Vasudevan Srinivasan wrote:
> 
> Hi,
> yes, as soon as i posted this msg, i tried both repaint()  and invalidate()
> functions. both dont solve the problem. is there anything like the "autosize"
> property/method ?
> actually, i think the repaint does happen as soon as property is changed. or
> else how could the text be redrawn with the font size?
> 
> or lets say, if i extend the JLabel can i override some function which would
> allow me to display full text avoiding the "...". which function of JLabel
> does this thing exactly?
> 
> Thanks for any info
> 
> Richard Wilkman wrote:
> 
> > Vasudevan:
> >
> > In the hintsandtips.txt is a tidbit that mentions that JFC items don't
> > repaint automaticly when a property set happens.  Usually all you need
> > to do after your setText() is a repaint().
> >
> > The trick is a little less dependable in Applets, but try that first.
> >
> > -Rich
> >
> > Vasudevan Srinivasan wrote:
> > >
> > > Hi,
> > > Im setting the size of a JLabel dynamically from an applet. When the
> > > size grows the end of text is replaced by "...". is there any property i
> > > need to set ?
> > > Thanks.
> >
> > --
> >
> > =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
> > Rich Wilkman
> > Senior Quality Assurance Engineer
> > Borland JBuilder Team
> >
> > If you see something that looks like an opinion up there,
> > it's mine and mine alone.
> >
> > Mail sent to me from the newsgroups won't bounce but will
> > be ignored.  If I have time, I'll respond, but you  have
> > a better chance if you confine your posts to the newsgroups
> > =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

-- 

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Rich Wilkman
Senior Quality Assurance Engineer
Borland JBuilder Team

If you see something that looks like an opinion up there,
it's mine and mine alone.

Mail sent to me from the newsgroups won't bounce but will
be ignored.  If I have time, I'll respond, but you  have
a better chance if you confine your posts to the newsgroups
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Technical Details
Message-ID: <36267523.2A8568E6@inprise.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <3626085B.E30108BB@netrisk.com> <36260F6D.F89CFB33@inprise.com> <3626136A.5C667519@netrisk.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 111d45,43e13e58b8f4a43b
X-Google-Attributes: gid111d45,public
From: Richard Wilkman <rwilkman@inprise.com>
Subject: Re: JLabel font size
Date: 1998/10/15
Message-ID: <36267523.2A8568E6@inprise.com>
X-Deja-AN: 401503805
Content-Transfer-Encoding: 7bit
References: <3626085B.E30108BB@netrisk.com> <36260F6D.F89CFB33@inprise.com> <3626136A.5C667519@netrisk.com>
Content-Type: text/plain; charset=us-ascii
Organization: Another Netscape Collabra Server User
Mime-Version: 1.0
Newsgroups: borland.public.jbuilder.java.swing