All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.noos.xing.mydoggy.itest.impl.UIUtil Maven / Gradle / Ivy

package org.noos.xing.mydoggy.itest.impl;

import java.awt.*;
import java.util.Vector;

/**
 * @author Angelo De Caro ([email protected])
 */
public class UIUtil {

    public static Vector getTopContainers(String name) {
        Vector containers = new Vector();

        Frame frames[] = Frame.getFrames();
        for (Frame frame : frames) {
            Window[] windows = frame.getOwnedWindows();

            for (Window window : windows) {
                if (window.getName() != null && window.getName().equals(name))
                    containers.add(window);
            }

            if (!containers.contains(frame)) {
                containers.add(frame);
            }
        }
        return containers;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy