🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Font and Size

#9813
From: James Cook
Date: Tue, 01 Feb 2000 00:00
36 lines
1783 bytes
Depends on *how* much you want to affect. Change the fonts for all buttons
by using:

    UIManager.put("Button.font", new FontResource("Dialog", Font.PLAIN,
24));

jim

Darcy Schultz <schuldar@yahoo.com> wrote in message
news:87774b$jj1@bornews.borland.com...
> The container-child rule no longer seems to apply for Swing controls.  I
too
> suspect that there is some way to do it with the UIManager or UIDefaults
of
> the Look and Feel part of Swing, but I can't seem to find the right place
to
> set it.  I've also noticed that different VMs seem to handle this a little
> differently.  The IBM, Inprise, MS and Sun VMs all look a little
different.
> I'm assuming that they just use different default fonts.  It's most
> noticeable in the fonts used for menu objects.
>
> thanks,
> Darcy.
>
> > Darcy:
> >
> > Not sure it still holds for JFC, but with awt font size was set by the
> > parent container at add() time if it wasn't already set on the object.
> > I think now, you handle this with the Look and Feel (which will make you
> > look like a Windows program if you use the Windows L&F).
> >
> > -Rich
>
>
>
Technical Details
Message-ID: <38975a70.0@news.dot.state.oh.us>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <877250$4001@bornews.borland.com> <3897140A.5A193B10@inprise.com> <87774b$jj1@bornews.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 111d45,4465b35f702de576
X-Google-Attributes: gid111d45,public
From: "James Cook" <jimcook.spaminator@remove.for.spam.iname.com>
Subject: Re: Font and Size
Date: 2000/02/01
Message-ID: <38975a70.0@news.dot.state.oh.us>
X-Deja-AN: 580531698
References: <877250$4001@bornews.borland.com> <3897140A.5A193B10@inprise.com> <87774b$jj1@bornews.borland.com>
X-Trace: 1 Feb 2000 17:13:04 -0500, dotfw001-dmz.dot.state.oh.us
X-MSMail-Priority: Normal
X-Priority: 3
Newsgroups: borland.public.jbuilder.java.swing
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2014.211