コード例 #1
0
 public static void main(String[] args) {
   if (args.length == 0) return;
   final String dbname = args[0];
   javax.swing.SwingUtilities.invokeLater(
       new Runnable() {
         public void run() {
           try {
             final DBInterface db = new DBInterface(dbname);
             DDTranslation.db = db;
             /*
             DDTranslation.preferred_languages=new Language[]{
             		new Language("ro", "RO"),new Language("ro", null),
             		new Language("en", "US"),new Language("en", null)};
             		*/
             DDTranslation.preferred_languages = new Language[] {new Language("ro", "RO")};
             DDTranslation.constituentID = 100;
             DDTranslation.organizationID = 100;
             // DDTranslation.preferred_charsets=new String[]{"latin","cyrillic","chinese"};
             DDTranslation.preferred_charsets = new String[] {"latin"};
             DDTranslation.authorship_charset = "latin";
             DDTranslation.authorship_lang = new Language("ro", "RO");
             createAndShowGUI(db);
           } catch (Exception e) {
             JOptionPane.showMessageDialog(null, "Error opening database!");
             e.printStackTrace();
             return;
           }
         }
       });
 }
コード例 #2
0
 public static void main(String[] args) {
   // Schedule a job for the event-dispatching thread:
   // creating and showing this application's GUI.
   javax.swing.SwingUtilities.invokeLater(
       new Runnable() {
         public void run() {
           createAndShowGUI();
         }
       });
 }
コード例 #3
0
ファイル: NodeStatusPanel.java プロジェクト: ekiwi/tinyos-1.x
 private void initColumnWidths(final JTable table) {
   javax.swing.SwingUtilities.invokeLater(
       new Runnable() {
         public void run() {
           table.getColumnModel().getColumn(0).setMaxWidth(100);
           table.getColumnModel().getColumn(1).setPreferredWidth(150);
           //                table.getColumnModel().getColumn(2).setPreferredWidth(5);
           //                table.getColumnModel().getColumn(3).setPreferredWidth(5);
           //                table.getColumnModel().getColumn(4).setPreferredWidth(5);
           //                table.getColumnModel().getColumn(5).setPreferredWidth(5);
           table.getColumnModel().getColumn(7).setPreferredWidth(175);
         }
       });
 }
コード例 #4
0
  public static void main(String[] args) {
    // Schedule a job for the event-dispatching thread:
    // creating and showing this application's GUI.

    javax.swing.SwingUtilities.invokeLater(
        new Runnable() {
          public void run() {
            BearSweeper frame = new BearSweeper();
            frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            frame.pack();
            frame.setVisible(true);
          }
        });
  }