isami100のSwingin' Seasar日記

2000-01-06 s2study.app.launcher

Launcher.java

package s2study.app.launcher;

import javax.swing.UIManager;
import org.seasar.framework.container.factory.SingletonS2ContainerFactory;

public class Launcher {

    public static void main(String[] args) {
        try {
            UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
            SingletonS2ContainerFactory.init();
            initContainer(SingletonS2ContainerFactory.getContainer());
        }
        catch (Exception e) {
            e.printStackTrace();
            System.exit(99);
        }
    }

    private static void initContainer(S2Container container) {
        for (int i = 0; i < container.getChildSize(); i++) {
            initContainer(container.getChild(i));
        }
        container.init();
    }
}