🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: JLabel font size

#12909
From: Vladimir Olenin
Date: Sun, 18 Oct 1998 00:00
168 lines
7268 bytes
This is a multi-part message in MIME format.
--------------EA7498F5C3311249E9490903
Content-Type: text/plain; charset=koi8-r
Content-Transfer-Encoding: 7bit

Yes, fully agree with Rich. Want only to add that if u have a lot of
components, it's better to use GridBagLayout. It's not as difficult as
people say. It's really convenient. Otherwise u can use Box layout from
Swing package. I rather mean static functions like createVertucalGlue
that allows u to distribute yr space efficiently. Though it's pretended
in tutorial that Box layout is simplier than GridBagLayout, as to me
it's not true. I used both Box and GB layouts, and concluded that the
last one is easier to use and the program is more readable with that
layout.

So, suit yourself,
                        Vladimir


Richard Wilkman wrote:
> 
> Vasudevan:
> 
> I'd start with the info on layout managers in the online help.
> Usually a successful layout is composed of several different layout
> managers, each doing what they do best.  Start by sketching out your
> dialog and deciding if it makes sense for certain clusters to be on
> their own panels, etc.
> 
> By using a non-coordinate based layout manager like XY, you get the
> sizing behaviour and support under different resoultions for "free".
> 
> -Rich
> 
> Vasudevan Srinivasan wrote:
> >
> > 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
> > > =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
> 
> --
> 
> =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
> 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
> =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

-- 
>-------<===========>-------<
Join in Java community now!
http://www.geocities.com/SiliconValley/Heights/9815
(NB: the page is under construction now)
>-------<===========>-------<
--------------EA7498F5C3311249E9490903
Content-Type: text/x-vcard; charset=koi8-r;
 name="keenonjava.vcf"
Content-Transfer-Encoding: 7bit
Content-Description: Card for Vladimir Olenin
Content-Disposition: attachment;
 filename="keenonjava.vcf"

begin:vcard
n:Vladimir;Olenin
x-mozilla-html:FALSE
adr:version:2.1
version:2.1
email;internet:keenonjava@collegemail.com
note:Java programmer. Open for project development offers. See my home page at: http://www.geocities.com/SiliconValley/Heights/9815/
end:vcard


--------------EA7498F5C3311249E9490903--
Technical Details
Message-ID: <36294ADE.51F1D095@collegemail.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> <3627784E.51A6D6E3@netrisk.com> <3627AADF.107AD32@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: Vladimir Olenin <keenonjava@collegemail.com>
Subject: Re: JLabel font size
Date: 1998/10/18
Message-ID: <36294ADE.51F1D095@collegemail.com>
X-Deja-AN: 402324779
References: <3626085B.E30108BB@netrisk.com> <36260F6D.F89CFB33@inprise.com> <3626136A.5C667519@netrisk.com> <36267523.2A8568E6@inprise.com> <3627784E.51A6D6E3@netrisk.com> <3627AADF.107AD32@inprise.com>
X-Accept-Language: en,ru
Content-Type: multipart/mixed; boundary="------------EA7498F5C3311249E9490903"
Organization: Another Netscape Collabra Server User
Mime-Version: 1.0
Newsgroups: borland.public.jbuilder.java.swing