🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: How to make Look & Feel work?

#11339
From: Greg Hamer
Date: Fri, 11 Jun 1999 00:00
20 lines
1508 bytes
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: <3761EA64.5D7584C8@borland.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <7jshtg$bm124@forums.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: Greg Hamer <ghamer@borland.com>
Subject: Re: How to make Look & Feel work?
Date: 1999/06/11
Message-ID: <3761EA64.5D7584C8@borland.com>
X-Deja-AN: 488678170
Content-Transfer-Encoding: 7bit
References: <7jshtg$bm124@forums.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