private void txtVertexNameKeyPressed(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_txtVertexNameKeyPressed
        if (evt.getKeyCode() == 10) {
            String vname = txtVertexName.getText();
            if (vname.isEmpty()) {
                drawing.addVertexRandName();
            } else {
                drawing.addVertex(txtVertexName.getText());
            }
            txtVertexName.setText("");
            if (!txtEdgeCost.getText().isEmpty() || txtEdgeCost.getText().length() != 0) {
                drawing.addEdge(Integer.valueOf(txtEdgeCost.getText()));
                txtEdgeCost.setText("");
            }
            txtVertexName.requestFocus();
        }
    }//GEN-LAST:event_txtVertexNameKeyPressed