コード例 #1
0
  public void setSimulator(HackSimulatorGUI simulator) {
    ((JComponent) simulator).setLocation(0, TOOLBAR_HEIGHT);
    this.getContentPane().add((JComponent) simulator, null);
    ((JComponent) simulator).revalidate();
    repaint();

    if (simulator.getUsageFileName() != null) {
      usageWindow = new HTMLViewFrame(simulator.getUsageFileName());
      usageWindow.setSize(450, 430);
    }

    if (simulator.getAboutFileName() != null) {
      aboutWindow = new HTMLViewFrame(simulator.getAboutFileName());
      aboutWindow.setSize(450, 420);
    }
  }
コード例 #2
0
 /** Called when the about window menu item was selected. */
 public void aboutMenuItem_actionPerformed() {
   if (aboutWindow != null) aboutWindow.setVisible(true);
 }
コード例 #3
0
 /** Called when the usage window menu item was selected. */
 public void usageMenuItem_actionPerformed() {
   if (usageWindow != null) usageWindow.setVisible(true);
 }