public void createMap(int size) {
        if (!edit) {
            gui.console("Click \"Edit Graph\" button");
            return;
        }

        clearGraph();

        boolean directed = graph.isDirected();
        graph.setDirected(false);

        int center_x = rel(getWidth() / 2);
        int center_y = rel(getHeight() / 2);

        Point p = new Point(center_x, center_y);
        createAroundVertex(p);

        for (int i = 1; i < size; i++) {
            createAroundVertex(new Point(p.x - i, p.y));
            createAroundVertex(new Point(p.x + i, p.y));
            for (int j = 1; j < size / 2; j++) {
                createAroundVertex(new Point(p.x - i, p.y + j));
                createAroundVertex(new Point(p.x + i, p.y - j));
                createAroundVertex(new Point(p.x + i, p.y + j));
                createAroundVertex(new Point(p.x - i, p.y - j));
            }
        }
        for (int i = 1; i < size / 2; i++) {
            createAroundVertex(new Point(p.x, p.y + i));
            createAroundVertex(new Point(p.x, p.y - i));
        }

        graph.setDirected(directed);
        repaint();
    }