/** Updates the componentTreeUI of all top-level windows of the current application. */ public static void updateAllComponentTreeUIs() { // for (Frame frame : Frame.getFrames()) { // updateAllComponentTreeUIs(frame); // } // JW: updated to new 1.6 api - returns all windows, owned and ownerless for (Window window : Window.getWindows()) { SwingUtilities.updateComponentTreeUI(window); } }
public static void updateComponentHierarchy() { // SwingUtilities.updateComponentTreeUI(GUIMediator.getMainOptionsComponent()); TipOfTheDayMediator.instance().updateComponentTreeUI(); NotifyUserProxy.instance().updateUI(); updateThemeObservers(); for (Window window : Window.getWindows()) { SwingUtilities.updateComponentTreeUI(window); } }
private void formWindowClosed( java.awt.event.WindowEvent evt) { // GEN-FIRST:event_formWindowClosed // TODO add your handling code here: List<Window> visibleWindows = new ArrayList<Window>(); for (Window w : Window.getWindows()) { if (w.isShowing()) { visibleWindows.add(w); } } if (visibleWindows.isEmpty()) System.exit(0); } // GEN-LAST:event_formWindowClosed
public void closeWin1() { Window win[] = java.awt.Window.getWindows(); // for (int i = 1; i < win.length; i++) { // i=0 - dong het cac cua so dang mo; i=1 - dong các cua so dang mo, tru cua so mo // dau tien win[i].dispose(); win[i] = null; } }
@Override public void execute() { Window[] windows = Window.getWindows(); for (Window window : windows) { if (window instanceof KitchenDisplayWindow) { window.setVisible(true); window.toFront(); return; } } KitchenDisplayWindow window = new KitchenDisplayWindow(); window.setVisible(true); }