src/gui/maptool/MapTool.java
private void resetHandler(ActionEvent event) {
        try {
            xDim = Integer.parseInt(xDimension.getText());
            yDim = Integer.parseInt(yDimension.getText());
            cells = new MapToolCell[xDim][yDim];
            grid.getChildren().clear();
            for (int x = 0; x < xDim; x++) {
                for (int y = 0; y < yDim; y++) {
                    cells[x][y] = makeCell(x, y);
                    grid.add(cells[x][y], x, y);
                }
            }
        } catch (NumberFormatException e) {
            // doesn't matter
        }
    }
/**
     * Creates a completely new grid.
     */
Creates a completely new grid.
Creates a completely new grid .
private void resetHandler(ActionEvent event) {
        try {
            xDim = Integer.parseInt(xDimension.getText());
            yDim = Integer.parseInt(yDimension.getText());
            cells = new MapToolCell[xDim][yDim];
            grid.getChildren().clear();
            for (int x = 0; x < xDim; x++) {
                for (int y = 0; y < yDim; y++) {
                    cells[x][y] = makeCell(x, y);
                    grid.add(cells[x][y], x, y);
                }
            }
        } catch (NumberFormatException e) {
        }
    }
private void resetHandler ( ActionEvent event ) { try { xDim = Integer . parseInt ( xDimension . getText ( ) ) ; yDim = Integer . parseInt ( yDimension . getText ( ) ) ; cells = new MapToolCell [ xDim ] [ yDim ] ; grid . getChildren ( ) . clear ( ) ; for ( int x = 0 ; x < xDim ; x ++ ) { for ( int y = 0 ; y < yDim ; y ++ ) { cells [ x ] [ y ] = makeCell ( x , y ) ; grid . add ( cells [ x ] [ y ] , x , y ) ; } } } catch ( NumberFormatException e ) { } }
Creates a completely new grid.
Creates a completely new grid .
// doesn't matter