// Load Spring context
ApplicationContext applicationContext = new ClassPathXmlApplicationContext(
"config/applicationContext.xml");
// Get an instance of the main window
MainWindow mainWindow = (MainWindow) applicationContext
.getBean("mainWindow");
mainWindow.init();
mainWindow.toFront();
}