private void OKButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_OKButtonActionPerformed
        int tempX, tempY, tempMines;
        try {
            tempX = Integer.parseInt(numX.getText());
            tempY = Integer.parseInt(numY.getText());
            tempMines = Integer.parseInt(numMines.getText());
        } catch (NumberFormatException nfe) {
            JOptionPane.showMessageDialog(this, "The boxes must be filled with numbers only.");
            return;
        }
        if (validate(tempX, tempY, tempMines)
                && (Minesweeper.myWidth != tempX
                || Minesweeper.myHeight != tempY
                || Minesweeper.Mines != tempMines)) {
            Minesweeper.myWidth = tempX;
            Minesweeper.myHeight = tempY;
            Minesweeper.Mines = tempMines;
            parent.newGame();
            parent.setCustom();
        } else if (!validate(tempX, tempY, tempMines)) {
            javax.swing.JOptionPane.showMessageDialog(null, "There must be between 9 and 30 horizontal spaces,\r\nbetween 9 and 24 vertical spaces,\r\nand between 10 and (x-1)(y-1) mines.");
            return;
        }
        this.dispose();
    }//GEN-LAST:event_OKButtonActionPerformed