Article View: borland.public.jbuilder.java.swing
Article #85Dynamically set Look And Feel Problem
From: Daniel Mark
Date: Thu, 12 Jan 2006 06:10
Date: Thu, 12 Jan 2006 06:10
27 lines
1680 bytes
1680 bytes
Hello all:
We have a problem when we dynamically change Look and Feel back to windows
Style.
When app is loaded, it uses windows Look and Feel(everything goes well). But
after we change it to other look and feel,
then change back to Windows look and feel, all components look great except
the JButton on JToolbar.
All those JButtons are larger than they should be and use more space than
they need.
The code we use to change back to windows look and feel is as follows:
try{UIManager.setLookAndFeel
("com.sun.java.swing.plaf.windows.WindowsLookAndFeel");
SwingUtilities.updateComponentTreeUI(frame);
this.pack(); }
catch(Exception ex){};
Thank you
-Daniel
Technical Details
Message-ID:
<43c5f24e@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!nx01.iad01.newshosting.com!newshosting.com!news-out.newsfeeds.com!propagator2-sterling.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Thread: 111d45,ff105693c43c4509,start X-Google-Attributes: gid111d45,public X-Google-Language: ENGLISH,ASCII-7-bit From: "Daniel Mark" <daneilmarkhot@hotmail.com> Newsgroups: borland.public.jbuilder.java.swing Subject: Dynamically set Look And Feel Problem Date: Thu, 12 Jan 2006 00:10:36 -0600 Lines: 29 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.2527 X-RFC2646: Format=Flowed; Original X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2527 NNTP-Posting-Host: 69.5.132.70 Message-ID: <43c5f24e@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1137046094 69.5.132.70 (11 Jan 2006 22:08:14 -0700) Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!nx01.iad01.newshosting.com!newshosting.com!news-out.newsfeeds.com!propagator2-sterling.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mail