🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Font and Size

#9814
From: rwilkman
Date: Tue, 01 Feb 2000 00:00
59 lines
2889 bytes
Darcy:

Look at how our wizards (Application and Applet) do it to get an idea on
the "where" in code (which is really tied to "when" in the real world)

There's different approaches to take.  The default is to use the default
for the OS instead of specifying a specific L&F (and that protects you
from the lawyers when you try to use Windows L&F on a non-Windows box). 
The L&F then fills in it's info from the system as best it can.  You can
tune this very tightly if you like, but then it may end up being a "run
only in this VM" issue (which would make you Microsoft).

This only gets you big things, line window colors, etc.  I can tweak my
Windows box in more ways than a L&F will look at.  It also doesn't make
you windows-like in the manner that a real native program will
immediatly reflect a style change in Windows.  It just gets you very
close.

Switch the L&F in Foundation between Metal and Windows.  In Windows
mode, what do you see that makes it not look like Windows?

-Rich

(P.S.  There is no Inprise VM.  It's the stock one from Sun that we use)

Darcy Schultz wrote:
> 
> 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

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

If something in this post looks like an opinion, walks like an
opinion and quacks like an opinion, it's mine and not that of
my employer.

If you are reading this from a newsgroup post, don't send mail.
=====
Technical Details
Message-ID: <389770C7.BB0DA8D@inprise.com>
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: rwilkman <rwilkman@inprise.com>
Subject: Re: Font and Size
Date: 2000/02/01
Message-ID: <389770C7.BB0DA8D@inprise.com>
X-Deja-AN: 580575244
Content-Transfer-Encoding: 7bit
References: <877250$4001@bornews.borland.com> <3897140A.5A193B10@inprise.com> <87774b$jj1@bornews.borland.com>
X-Accept-Language: en
Content-Type: text/plain; charset=us-ascii
Organization: Another Netscape Collabra Server User
Mime-Version: 1.0
Newsgroups: borland.public.jbuilder.java.swing