🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: How to make Look & Feel work?

#11295
From: Alexis Rios
Date: Wed, 16 Jun 1999 00:00
33 lines
1682 bytes
Thank you good help
Greg Hamer <ghamer@borland.com> wrote in message
news:3761EA64.5D7584C8@borland.com...
> The designer just changes it on the fly so you can see what it looks like.
You
> need to right a line of code to force it in your code, if that is what you
want.
> (I think that swing kind of expects you to use the default look & feel for
the
> platform you are running on).
> To force it to a particular look&feel you need to  add a line that
executes
> before any UI is created (a static initializer works well):
>
javax.swing.UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName
());
>
> where the parameter is the look&feel that you wish to use. To change it
> on-the-fly
> use SwingUtilities.updateComponentTreeUI(Component parent_of_your_world);
after
> you have set the look and feel as above.
>
> Alexis Rios wrote:
>
> > I changed the look and feel for a JBuilder 3 app to Metal (using right
click
> > over a JFrame), but when I run it, it looks like Windows, although at
design
> > time it looks Metal, why this is happening.
> >
> > Thank you
>
Technical Details
Message-ID: <7k9da1$nje12@forums.borland.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <7jshtg$bm124@forums.borland.com> <3761EA64.5D7584C8@borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 111d45,7a4a5d24b5a49a09
X-Google-Attributes: gid111d45,public
From: "Alexis Rios" <alexr@coqui.net>
Subject: Re: How to make Look & Feel work?
Date: 1999/06/16
Message-ID: <7k9da1$nje12@forums.borland.com>
X-Deja-AN: 490462051
References: <7jshtg$bm124@forums.borland.com> <3761EA64.5D7584C8@borland.com>
X-Priority: 3
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2014.211
Organization: Another Netscape Collabra Server User
X-MSMail-Priority: Normal
Newsgroups: borland.public.jbuilder.java.swing