public DialogNewGraph(GraphType graphType, boolean force) {
            panel.setLayout(new GridLayout(4, 2, 5, 5));
            panel.add(new JLabel("Type "));
            choose.setSelectedIndex(graphType.ordinal());
            choose.addActionListener(this);
            if (force && graphType != GraphType.any)
                choose.setEnabled(false);
            panel.add(choose);
            for (int i = 0; i < 2; ++i) {
                labels[i] = new JLabel();
                inputFields[i] = new InputField();
                panel.add(labels[i]);
                panel.add(inputFields[i]);
            }
            panel.add(new JLabel("Create edges? "));
            panel.add(edges);
            edges.setSelected(true);
            actionPerformed(null);
        }