Exemplo n.º 1
0
  public void prevStep() {
    game.prevStep();

    mainPanel.remove(boardPanel);
    boardPanel.removeAll();
    boardPanel.add(new JLabel(game.outputText()), BorderLayout.NORTH);
    boardPanel.add(new JLabel(game.outputBoard()), BorderLayout.CENTER);
    mainPanel.add(boardPanel);

    repaint();
    printAll(getGraphics());
  }
Exemplo n.º 2
0
  private void buildScreen() {

    boardPanel.add(new JLabel(game.outputText()), BorderLayout.NORTH);

    boardPanel.add(new JLabel(game.outputBoard()), BorderLayout.CENTER);

    mainPanel.add(boardPanel, BorderLayout.CENTER);

    add(mainPanel);

    setVisible(true);
  }