Example usage for javax.swing SwingUtilities invokeLater

List of usage examples for javax.swing SwingUtilities invokeLater

Introduction

In this page you can find the example usage for javax.swing SwingUtilities invokeLater.

Prototype

public static void invokeLater(Runnable doRun) 

Source Link

Document

Causes doRun.run() to be executed asynchronously on the AWT event dispatching thread.

Usage

From source file:gtu._work.etc.SqlReplacerUI.java

/**
* Auto-generated main method to display this JFrame
*//*from   w  w  w. java2 s.c  o  m*/
public static void main(String[] args) {
    SwingUtilities.invokeLater(new Runnable() {
        public void run() {
            SqlReplacerUI inst = new SqlReplacerUI();
            inst.setLocationRelativeTo(null);
            gtu.swing.util.JFrameUtil.setVisible(true, inst);
        }
    });
}

From source file:painting.SwingPaintDemo1.java

public static void main(String[] args) {
    SwingUtilities.invokeLater(new Runnable() {
        public void run() {
            createAndShowGUI();//from w w  w. j  av a  2s. c o  m
        }
    });
}

From source file:gtu.xml.work.CacDBUI4Janna.java

/**
 * Auto-generated main method to display this JFrame
 *//*w ww. j  a  va 2s .co  m*/
public static void main(String[] args) {
    SwingUtilities.invokeLater(new Runnable() {
        public void run() {
            CacDBUI4Janna inst = new CacDBUI4Janna();
            inst.setLocationRelativeTo(null);
            gtu.swing.util.JFrameUtil.setVisible(true, inst);
        }
    });
}

From source file:net.sf.jabref.JabRefMain.java

public static void main(String[] args) {
    SwingUtilities.invokeLater(() -> start(args));
}

From source file:lince.LinceApp.java

/**
 * @param args the command line arguments
 *//*from www  . j a  v  a  2s.  c o  m*/
public static void main(final String[] args) {
    String vlcPath = StringUtils.EMPTY;
    try {
        if (RuntimeUtil.isWindows()) {
            vlcPath = WindowsRuntimeUtil.getVlcInstallDir();
            /*if (StringUtils.isEmpty(vlcPath)){
                vlcPath= "C:\\Program Files (x86)\\VideoLAN";
            }*/
            System.setProperty("jna.library.path", vlcPath);
            setI18n();
        }
        SwingUtilities.invokeLater(new Runnable() {

            @Override
            public void run() {
                LinceFrame.getInstance();
            }
        });
    } catch (Exception e) {
        logger.log(Level.SEVERE, "Error inicializando main. vlcPath@" + vlcPath, e);
    }
}

From source file:gtu._work.ui.LogAppendStartEndUI.java

/**
* Auto-generated main method to display this JFrame
*///w w  w . ja  v a2 s. co  m
public static void main(String[] args) {
    SwingUtilities.invokeLater(new Runnable() {
        public void run() {
            LogAppendStartEndUI inst = new LogAppendStartEndUI();
            inst.setLocationRelativeTo(null);
            gtu.swing.util.JFrameUtil.setVisible(true, inst);
        }
    });
}

From source file:Main.java

public static void main(String[] args) throws Exception {
    URL urlFG = new URL("http://www.java2s.com/style/download.png");
    URL urlBG = new URL("http://www.java2s.com/style/download.png");
    final BufferedImage biFG = ImageIO.read(urlFG);
    final BufferedImage biBG = ImageIO.read(urlBG);
    SwingUtilities.invokeLater(new Runnable() {
        @Override//from   w  ww. ja v  a2  s. c om
        public void run() {
            draw(biBG, biFG);
        }
    });
}

From source file:sample.fa.ScriptRunnerApplicationMac.java

public static void main(String[] args) {
    SwingUtilities.invokeLater(() -> {
        ScriptRunnerApplication app = new ScriptRunnerApplication();
        app.createGUI();// w w  w .  j a v  a  2s  .c o m
        if (args.length > 0) {
            File f = new File(args[0]);
            if (f.isFile()) {
                app.loadScript(f);
            }
        }

        Application.getApplication().setOpenFileHandler((AppEvent.OpenFilesEvent ofe) -> {
            List<File> files = ofe.getFiles();
            if (files != null && files.size() > 0) {
                app.loadScript(files.get(0));
            }
        });

    });
}

From source file:gtu._work.ui.JSFMakerUI_attrDialog.java

/**
 * Auto-generated main method to display this JDialog
 *///w w w. j av  a  2  s .c  om
public static void main(String[] args) {
    SwingUtilities.invokeLater(new Runnable() {
        public void run() {
            JFrame frame = new JFrame();
            JSFMakerUI_attrDialog inst = new JSFMakerUI_attrDialog(frame);
            gtu.swing.util.JFrameUtil.setVisible(true, inst);
        }
    });
}

From source file:gtu._work.ui.StringArrayMakerUI.java

/**
 * Auto-generated main method to display this JFrame
 *///w  w w  . ja v a2s. co m
public static void main(String[] args) {
    SwingUtilities.invokeLater(new Runnable() {
        public void run() {
            StringArrayMakerUI inst = new StringArrayMakerUI();
            inst.setLocationRelativeTo(null);
            gtu.swing.util.JFrameUtil.setVisible(true, inst);
        }
    });
}