Java tutorial
//package com.java2s; import java.awt.Window; import javax.swing.SwingUtilities; public class Main { public static void updateUI() { SwingUtilities.invokeLater(new Runnable() { @Override public void run() { // TODO Auto-generated method stub Window windows[] = Window.getWindows(); for (int i = 0; i < windows.length; i++) { if (windows[i].isDisplayable()) { SwingUtilities.updateComponentTreeUI(windows[i]); } } } }); } }