List of usage examples for java.awt EventQueue invokeLater
public static void invokeLater(Runnable runnable)
From source file:TimerSample.java
public static void main(String args[]) { Runnable runner = new Runnable() { public void run() { Timer.setLogTimers(true); ActionListener actionListener = new ActionListener() { public void actionPerformed(ActionEvent actionEvent) { System.out.println("Hello World Timer"); }//from ww w. j a v a 2s. c om }; Timer timer = new Timer(500, actionListener); timer.start(); } }; EventQueue.invokeLater(runner); }
From source file:com.litt.core.security.license.gui.Gui.java
/** * Launch the application.//w w w .j a va 2s . c o m */ public static void main(String[] args) { EventQueue.invokeLater(new Runnable() { public void run() { try { Gui window = new Gui(); window.frame_security.setVisible(true); } catch (Exception e) { e.printStackTrace(); } } }); }
From source file:SimpleFrameTest.java
public static void main(String[] args) { EventQueue.invokeLater(new Runnable() { public void run() { SimpleFrame frame = new SimpleFrame(); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); frame.setVisible(true);/* ww w. ja va2s. c om*/ } }); }
From source file:SizedFrameTest.java
public static void main(String[] args) { EventQueue.invokeLater(new Runnable() { public void run() { SizedFrame frame = new SizedFrame(); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); frame.setVisible(true);//from www. j a v a2s . c om } }); }
From source file:NotHelloWorld.java
public static void main(String[] args) { EventQueue.invokeLater(new Runnable() { public void run() { NotHelloWorldFrame frame = new NotHelloWorldFrame(); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); frame.setVisible(true);//from w ww. j av a 2s . c o m } }); }
From source file:inc.cygnus.app.MainSpring.java
public static void main(String[] args) { EventQueue.invokeLater(new Runnable() { public void run() { try { // Implementasi Konfigurasi Spring framework @SuppressWarnings("resource") ApplicationContext appContext = new ClassPathXmlApplicationContext("applicationContext.xml"); // Initialize service setCustomerService((CustomerService) appContext.getBean("customerService")); setProductService((ProductService) appContext.getBean("productService")); setPurchaseService((PurchaseService) appContext.getBean("purchaseService")); try { // After finish service initialize // Show Form Menu Master UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); } catch (ClassNotFoundException ex) { Logger.getLogger(MainSpring.class.getName()).log(Level.SEVERE, null, ex); } catch (InstantiationException ex) { Logger.getLogger(MainSpring.class.getName()).log(Level.SEVERE, null, ex); } catch (IllegalAccessException ex) { Logger.getLogger(MainSpring.class.getName()).log(Level.SEVERE, null, ex); } catch (UnsupportedLookAndFeelException ex) { Logger.getLogger(MainSpring.class.getName()).log(Level.SEVERE, null, ex); }/*from www .j a va 2 s . c o m*/ Menu mmv = new Menu(); mmv.setVisible(true); } catch (BeansException e) { e.printStackTrace(); } } }); }
From source file:ButtonTest.java
public static void main(String[] args) { EventQueue.invokeLater(new Runnable() { public void run() { ButtonFrame frame = new ButtonFrame(); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); frame.setVisible(true);/*w w w.j a v a2s. c o m*/ } }); }
From source file:DrawTest.java
public static void main(String[] args) { EventQueue.invokeLater(new Runnable() { public void run() { DrawFrame frame = new DrawFrame(); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); frame.setVisible(true);/*from ww w. j a v a2s.c o m*/ } }); }
From source file:FillTest.java
public static void main(String[] args) { EventQueue.invokeLater(new Runnable() { public void run() { FillFrame frame = new FillFrame(); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); frame.setVisible(true);//from w w w .j a v a 2 s.c o m } }); }
From source file:ChangeTrackingTest.java
public static void main(String[] args) { EventQueue.invokeLater(new Runnable() { public void run() { ColorFrame frame = new ColorFrame(); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); frame.setVisible(true);/*w w w. j a v a 2 s. c o m*/ } }); }