🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: borland.public.jbuilder.java.swing
2 messages
2 total messages Started by Daniel Mark Thu, 12 Jan 2006 06:10
Dynamically set Look And Feel Problem
#85
Author: Daniel Mark
Date: Thu, 12 Jan 2006 06:10
27 lines
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 
Re: Dynamically set Look And Feel Problem
#86
Author: Lori M Olson [TeamB]
Date: Fri, 13 Jan 2006 01:29
55 lines
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
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads