java.net.URL templateURL = getClass().getResource("/wingset/templates/ExampleFrame.thtml"); if( templateURL == null ){ contentPane.add(new SLabel("Sorry, can't find ExampleFrame.thtml. Are you using a JAR-File?"));
URL templateURL = getClass().getResource("/wingset/templates/ExampleFrame.thtml"); if (templateURL != null) { SRootLayout layout = new SRootLayout(templateURL); frame.setLayout(layout);
    public WingSet() {        frame = new SFrame("WingSet");        System.out.println("new WingSet");        stopWatch = new TimeMeasure(new MessageFormat("<b>{0}</b>: {1} (<i>x {2}</i>)<br/>"));        timeMeasure = new SLabel();        timeMeasure.setEscapeSpecialChars(false);        frame.setTitle("WingSet Demo");        SContainer contentPane = frame.getContentPane();        try {            java.net.URL templateURL =                 getClass().getResource("/wingset/templates/ExampleFrame.thtml");            if( templateURL == null ){                contentPane.add(new SLabel("Sorry, can't find ExampleFrame.thtml. Are you using a JAR-File?"));            }            STemplateLayout layout = new STemplateLayout( templateURL );            contentPane.setLayout( layout );        }        catch ( java.io.IOException except ) {            except.printStackTrace();        }                STabbedPane tab = new STabbedPane();        tab.setMaxTabsPerLine(8);        tab.setBackgroundImage(brushedMetal);        tab.add(new WingsImage(), "wingS!");        tab.add(new LabelExample(), "Label");        tab.add(new BorderExample(), "Border");        tab.add(new TextComponentExample(), "Text Component");         // a Tab with icon..        tab.addTab("Tree", new ResourceImageIcon("org/wings/icons/JavaCup.gif"),                    new TreeExample(), "Tree Tool Tip");        tab.add(new OptionPaneExample(frame), "OptionPane");        tab.add(new TableExample(), "Table");        tab.add(new ListExample(), "List");        tab.add(new ButtonExample(), "Button");        tab.add(new CheckBoxExample(), "CheckBox");        tab.add(new RadioButtonExample(), "RadioButton");        tab.add(new Faces(), "Faces");        tab.add(new FileChooserExample(), "FileChooser");        tab.add(new ScrollPaneExample(), "ScrollPane");        tab.add(new PageScrollerExample(), "PageScroller");        //tab.add(new LayoutExample(), "Simple Layout");        tab.addTab("Template Layout",                    new ResourceImageIcon(cl, "wingset/icons/cowSmall.gif"),                    new TemplateExample(), "Template Layout Manager");        //tab.add(new DateChooserExample(), "DateChooser");        contentPane.add(tab, "WingSetApp");        contentPane.add(timeMeasure, "TimeLabel");        frame.show();    }