private static void updateWindow(WinWindow window) { Message.SendMessageA(window.handle, WM_PAINT, 0, 0); Iterator<WinWindow> children = window.getChildren(); while (children.hasNext()) { WinWindow child = children.next(); updateWindow(child); } }