Example #1
0
 /* Run the game. */
 public static void main(String[] args) {
   javax.swing.SwingUtilities.invokeLater(
       new Runnable() {
         public void run() {
           createAndShowGUI();
         }
       });
 }
Example #2
0
 /** *********************************************************************** */
 public static void main(String[] args) { // called when the program starts
   javax.swing.SwingUtilities.invokeLater(
       new Runnable() { // Start the createAndShowGUI method in a separate thread
         public void run() {
           createAndShowGUI();
         }
       });
 }
Example #3
0
 // --------------------------------main---------------------------------------
 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();
         }
       });
 }
Example #4
0
  public static void main(String[] args) {
    EpubUtils.EPUB = new File(args[0]);
    EpubUtils.EPUB_FOLDER = args[1];
    EpubUtils.prepare("splitter", "split");

    javax.swing.SwingUtilities.invokeLater(
        new Runnable() {
          public void run() {
            createAndShowGUI();
          }
        });
  }
Example #5
0
 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);
         }
       });
 }
Example #6
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);
          }
        });
  }
Example #7
0
  public YarharMain() {
    super("YarHar!");
    int screenX = 1024;
    int screenY = 800;
    this.setSize(screenX, screenY);
    this.setJMenuBar(new YarharMenuBar(this));

    this.addWindowListener(this);
    this.addWindowFocusListener(this);

    this.add(borderPanel);

    toolsPanel = new ToolsPanel(this);
    //    borderPanel.add(toolsPanel, BorderLayout.NORTH);

    spriteLibPanel = new SpriteLibraryPanel(this);
    layersPanel = new LayersPanel(this);
    editorPanel = new EditorPanel(this);
    sidePane = new JSplitPane(JSplitPane.VERTICAL_SPLIT, layersPanel, spriteLibPanel);
    sidePane.setContinuousLayout(true);
    sidePane.setResizeWeight(0.5);

    splitPane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, sidePane, editorPanel);
    splitPane.setContinuousLayout(true);
    splitPane.setResizeWeight(0.0);

    borderPanel.add(splitPane, BorderLayout.CENTER);

    footer = new StatusFooterPanel(this);
    borderPanel.add(footer, BorderLayout.SOUTH);

    // finishing touches on Game window
    this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    this.setVisible(true);

    config = YarharConfig.load();

    System.err.println("Game Window successfully created!!!");

    editorPanel.start();

    // Swing can't correctly place divider locations on startup. So we must
    // set their locations later when everything else is initialized.
    javax.swing.SwingUtilities.invokeLater(
        new Runnable() {
          public void run() {
            setDividerLocations();
          }
        });
  }
Example #8
0
  public static void main(String[] arguments) {
    // Schedule a job for the event dispatch thread:
    // creating and showing this application's GUI.

    try {
      UIManager.setLookAndFeel("javax.swing.plaf.metal.MetalLookAndFeel");
    } catch (UnsupportedLookAndFeelException ex) {
      ex.printStackTrace();
    } catch (IllegalAccessException ex) {
      ex.printStackTrace();
    } catch (InstantiationException ex) {
      ex.printStackTrace();
    } catch (ClassNotFoundException ex) {
      ex.printStackTrace();
    }

    javax.swing.SwingUtilities.invokeLater(
        new Runnable() {
          public void run() {
            createAndShowGUI();
          }
        });
  }
  public static void main(String[] args) {
    String clientSettingFile = "";
    GetOpt getopt = new GetOpt(args, "f:");
    try {
      int c;
      while ((c = getopt.getNextOption()) != -1) {
        switch (c) {
          case 'f':
            clientSettingFile = getopt.getOptionArg();
            break;
        }
      }
    } catch (Exception e1) {
      e1.printStackTrace();
    }
    final DHTInteractiveClient dhtClient = new DHTInteractiveClient(clientSettingFile);

    javax.swing.SwingUtilities.invokeLater(
        new Runnable() {
          public void run() {
            dhtClient.createAndShowGUI();
          }
        });
  }