🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: JLabel font size

#12902
From: Vasudevan Srinivasan
Date: Fri, 16 Oct 1998 00:00
91 lines
4169 bytes
Hi,
Thanks. You are right. it was XYLayout that was causing most of the problems. when
using it, there are other problems as well when run in different resolutions. For
eg I run an applet under NS in a different resolution, for which my checkboxes
didnt respond to a click ! I had to (arbitrarily) adjust XY positions for the
applet to respond to clicks.

Said that, can any one suggest the best layout to use for dialog boxes given that
it will contain textfields, labels, checkboxes, comboboxes, option groups in a
conceivable complex fashion, in swing ? Even when I use layouts, I still have to
set the preferredSize & minimumSize for the dialog-box to look "proper". Will this
(using layouts with setting sizes manually) guarantee that the dialog box controls
wont be affected by different resolutions ? also on different platforms ?

Thanks

Richard Wilkman wrote:

> 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: <3627784E.51A6D6E3@netrisk.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <3626085B.E30108BB@netrisk.com> <36260F6D.F89CFB33@inprise.com> <3626136A.5C667519@netrisk.com> <36267523.2A8568E6@inprise.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: Vasudevan Srinivasan <vasudevan@netrisk.com>
Subject: Re: JLabel font size
Date: 1998/10/16
Message-ID: <3627784E.51A6D6E3@netrisk.com>
X-Deja-AN: 401848703
Content-Transfer-Encoding: 7bit
References: <3626085B.E30108BB@netrisk.com> <36260F6D.F89CFB33@inprise.com> <3626136A.5C667519@netrisk.com> <36267523.2A8568E6@inprise.com>
Content-Type: text/plain; charset=us-ascii
Organization: NetRisk Inc.
Mime-Version: 1.0
Newsgroups: borland.public.jbuilder.java.swing