Examples of XOButton


Examples of com.softuni.raxus.screens.buttons.XOButton

    this.playScreen = playScreen;
  }

  @Override
  public void actionPerformed(ActionEvent e) {
    XOButton button = (XOButton) e.getSource();
    // if (isXTurn) {
    button.changeIcon();
    playScreen.checkWin();
    // }
    // // isXTurn = !isXTurn;
    // button.setTurn(isXTurn);
  }
View Full Code Here

Examples of com.softuni.raxus.screens.buttons.XOButton

    JPanel gridPanel = new JPanel(new GridLayout(ROWS, COLUMNS));

    // Populate the GridLayout with buttons
    for (int i = 0; i < ROWS; i++) {
      for (int j = 0; j < COLUMNS; j++) {
        buttonArray[i][j] = new XOButton();
        buttonArray[i][j].addActionListener(new XOButtonListener(this));
        gridPanel.add(buttonArray[i][j], BorderLayout.WEST);
      }
    }
    //
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.