Thread View: borland.public.jbuilder.java.swing
6 messages
6 total messages
Started by Mike
Thu, 12 May 2005 22:20
UI management
Author: Mike
Date: Thu, 12 May 2005 22:20
Date: Thu, 12 May 2005 22:20
15 lines
1408 bytes
1408 bytes
I am having a problem updating the laf of my java program.
I have changed the laf using:
UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
which works fine, then I use successive calls to:
SwingUtilities.updateComponentTreeUI();
to update container component laf in my main window.
The problem is, when I call SwingUtilities.updateComponentTreeUI(mainMenu);
it does not update the laf of all of the menu items themselves. Only some of
the menu items take the new laf and some do not????
Anyone have any idea what could be causing this? Or how to fix this?
Re: UI management
Author: Lori M Olson [TeamB]
Date: Thu, 12 May 2005 22:25
Date: Thu, 12 May 2005 22:25
41 lines
2369 bytes
2369 bytes
Mike wrote:
> I am having a problem updating the laf of my java program.
>
> I have changed the laf using:
> UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
>
> which works fine, then I use successive calls to:
> SwingUtilities.updateComponentTreeUI();
>
> to update container component laf in my main window.
>
> The problem is, when I call SwingUtilities.updateComponentTreeUI(mainMenu);
> it does not update the laf of all of the menu items themselves. Only some of
> the menu items take the new laf and some do not????
>
> Anyone have any idea what could be causing this? Or how to fix this?
>
>
Huh? Why would you use "successive calls"? You are supposed to call
SwingUtilities.updateComponentTreeUI(myFrame), where myFrame is the root
window of your application.
--
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
Re: UI management
Author: Mike
Date: Thu, 12 May 2005 23:09
Date: Thu, 12 May 2005 23:09
47 lines
2539 bytes
2539 bytes
I tried that the first time. It only updates the laf of the main window, and non of it subcomponents. The only way I have found to get it to work, is like I mentioned. "Lori M Olson [TeamB]" <javadragon@techie.com> wrote in message news:4283d7c0@newsgroups.borland.com... > Mike wrote: >> I am having a problem updating the laf of my java program. >> >> I have changed the laf using: >> UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); >> >> which works fine, then I use successive calls to: >> SwingUtilities.updateComponentTreeUI(); >> >> to update container component laf in my main window. >> >> The problem is, when I call >> SwingUtilities.updateComponentTreeUI(mainMenu); it does not update the >> laf of all of the menu items themselves. Only some of the menu items take >> the new laf and some do not???? >> >> Anyone have any idea what could be causing this? Or how to fix this? > > Huh? Why would you use "successive calls"? You are supposed to call > SwingUtilities.updateComponentTreeUI(myFrame), where myFrame is the root > window of your application. > > -- > > 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
Re: UI management
Author: Lori M Olson [TeamB]
Date: Thu, 12 May 2005 23:54
Date: Thu, 12 May 2005 23:54
31 lines
1893 bytes
1893 bytes
Mike wrote:
> I tried that the first time.
> It only updates the laf of the main window, and non of it subcomponents.
> The only way I have found to get it to work, is like I mentioned.
>
Hmmm. You should only have to do this for your "top-level" windows (ie
- windows with no parents).
This article illustrates it:
http://bdn.borland.com/article/0,1410,29991,00.html
--
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
Re: UI management
Author: Mike
Date: Fri, 13 May 2005 00:11
Date: Fri, 13 May 2005 00:11
37 lines
2064 bytes
2064 bytes
Yup. Thats exactly how I do it. Weird problem huh? "Lori M Olson [TeamB]" <javadragon@techie.com> wrote in message news:4283ecb0$1@newsgroups.borland.com... > Mike wrote: >> I tried that the first time. >> It only updates the laf of the main window, and non of it subcomponents. >> The only way I have found to get it to work, is like I mentioned. >> > > Hmmm. You should only have to do this for your "top-level" windows (ie - > windows with no parents). > > This article illustrates it: > > http://bdn.borland.com/article/0,1410,29991,00.html > > -- > > 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
Re: UI management
Author: Lori M Olson [TeamB]
Date: Fri, 13 May 2005 00:28
Date: Fri, 13 May 2005 00:28
14 lines
1277 bytes
1277 bytes
Mike wrote: > Yup. Thats exactly how I do it. > > Weird problem huh? > I'm starting to think bug in JDK. Exactly what version of the JDK are you using? -- Regards, Lori Olson [TeamB]
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