Пример #1
0
  public void addGamePanels() {
    gamePanel = new GameSelectionPanels(resWidth, resHeight);
    for (int i = 0; i < gamePanel.getNumberOfPanels(); i++) { // Adds the
      // game
      // panels to
      // the
      // content
      // pane.
      contentPane.add(gamePanel.getPanel(i), "p1");
    }

    this.controller.updateButtons(gamePanel.buttons());
  }
Пример #2
0
 // 140509 TA
 public void setCurrentPanel(String panelName) {
   if (panelName.equals("Main")) currentPanel = mainMenu;
   else if (panelName.equals("Games")) currentPanel = gamePanel.getPanel(0);
   else if (panelName.equals("Options")) currentPanel = optionsMenu;
   else if (panelName.equals("About")) currentPanel = aboutMenu;
 }
Пример #3
0
 /**
  * Returns the 1st game panel
  *
  * @return game menu panel
  */
 public JPanel getGamePanel() {
   return gamePanel.getPanel(0);
 }