コード例 #1
0
  // If the applet is called as an application
  public static void main(String[] args) {

    // Create the frame
    mainFrame = new JFrame("Uintah User Interface");

    // Add a window listener
    mainFrame.addWindowListener(
        new WindowAdapter() {
          public void windowClosing(WindowEvent e) {
            System.exit(0);
          }
        });

    // instantiate
    UintahGui uintahGui = new UintahGui();
    uintahGui.init();

    // Add the stuff to the frame
    mainFrame.setLocation(20, 50);
    mainFrame.setContentPane(uintahGui);
    mainFrame.pack();
    mainFrame.setVisible(true);
  }