Article View: borland.public.jbuilder.java.swing
Article #86Re: Dynamically set Look And Feel Problem
From: Lori M Olson [TeamB]
Date: Fri, 13 Jan 2006 01:29
Date: Fri, 13 Jan 2006 01:29
55 lines
2519 bytes
2519 bytes
Daniel Mark wrote:
> 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
>
>
Well, it sounds like you've narrowed it down. It must be a problem with
JToolbar, or a subcomponent of it.
Have you tryed to call UIManager.setLookAndFeel and explicitly pass in
the JToolbar?
--
Regards,
Lori Olson [TeamB]
------------
Save yourself, and everyone else, some time and search the
newsgroups and the FAQ-O-Matic before posting your next
question.
Google Advanced Newsgroup Search
http://www.google.ca/advanced_group_search
Other Newsgroup Searches:
http://www.borland.com/newsgroups/ngsearch.html
Joi Ellis's FAQ-O-Matic:
http://www.visi.com/~gyles19/fom-serve/cache/1.html
Technical Details
Message-ID:
<43c701de@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news3.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-mailReferences:
<43c5f24e@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 111d45,ff105693c43c4509 X-Google-Attributes: gid111d45,public X-Google-Language: ENGLISH,ASCII-7-bit Date: Thu, 12 Jan 2006 18:29:31 -0700 From: "Lori M Olson [TeamB]" <javadragon@techie.com> User-Agent: Mozilla Thunderbird 1.0.2 (Macintosh/20050317) X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: borland.public.jbuilder.java.swing Subject: Re: Dynamically set Look And Feel Problem References: <43c5f24e@newsgroups.borland.com> In-Reply-To: <43c5f24e@newsgroups.borland.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit NNTP-Posting-Host: 142.179.182.172 Message-ID: <43c701de@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1137115614 142.179.182.172 (12 Jan 2006 17:26:54 -0700) Lines: 55 Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news3.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