1 50 package org.apache.avalon.fortress.examples.swing; 51 52 import org.apache.avalon.fortress.impl.DefaultContainerManager; 53 import org.apache.avalon.fortress.util.FortressConfig; 54 import org.apache.avalon.fortress.ContainerManager; 55 import org.apache.avalon.framework.container.ContainerUtil; 56 57 63 public final class Main 64 { 65 71 public static void main( String [] args ) 72 throws Exception 73 { 74 final FortressConfig config = new FortressConfig(); 76 config.setContainerClass( SwingContainer.class ); 77 config.setContainerConfiguration( "resource://org/apache/avalon/fortress/examples/swing/SwingContainer.xconf" ); 78 config.setLoggerManagerConfiguration( "resource://org/apache/avalon/fortress/examples/swing/SwingContainer.xlog" ); 79 config.setInstrumentManagerConfiguration( "resource://org/apache/avalon/fortress/examples/swing/SwingContainer.instruments" ); 80 81 ContainerManager cm = new DefaultContainerManager( config.getContext() ); 83 ContainerUtil.initialize( cm ); 84 85 93 ( (SwingContainer)cm.getContainer() ).run(); 94 95 ContainerUtil.dispose( cm ); 97 } 98 } 99 100 | Popular Tags |