JFrame.updateAllUI()

P

Peter

hi all
The function updateAllUI() doesn't not recongize in the JDK1.4 doc.
But it does exist. When i call it after i changed UIManager, it give
me a StackOverflowError

try {
UIManager.setLookAndFeel(new com.incors.plaf.kunststoff.
KunststoffLookAndFeel());
updateAllUI();
} catch (Exception ee) {
ee.printStackTrace();
}

What is the correctly way to update all the components within a
JFrame?
Manually call UpdateUI() on every component is not effectively.

thanks
from Peter ([email protected])
 
J

Jon A. Cruz

Peter said:
What is the correctly way to update all the components within a
JFrame?
Manually call UpdateUI() on every component is not effectively.

First, you will need to change *all* instances.

See java.awt.Frame.getFrames()

Then for each of those, call SwingUtilities.updateComponentTreeUI().
 
L

Larry A Barowski

Jon A. Cruz said:
First, you will need to change *all* instances.

See java.awt.Frame.getFrames()

Then for each of those, call SwingUtilities.updateComponentTreeUI().

Also you'll have to call updateUI for things like popup menus
and (your own) cell renderers, which are not the children of any
component.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,584
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top