public void actionPerformed(ActionEvent ae) {
						try {
							BayesNetGenerator generator = new BayesNetGenerator();
							m_BayesNet = generator;
							m_BayesNet.clearUndoStack();
							
							String[] options = new String[8];
							options[0] = "-N";
							options[1] = "" + jTfNrOfNodes.getText();
							options[2] = "-A";
							options[3] = "" + jTfNrOfArcs.getText();
							options[4] = "-C";
							options[5] = "" + jTfCardinality.getText();
							options[6] = "-S";
							options[7] = "" + jTfSeed.getText();
							generator.setOptions(options);
							generator.generateRandomNetwork();
							// Convert to EditableBayesNet
							// This ensures the getOptions() called by GenericObjectEditor to get the correct result.
							BIFReader bifReader = new BIFReader();
							bifReader.processString(m_BayesNet.toXMLBIF03());
							m_BayesNet = new EditableBayesNet(bifReader);

							updateStatus();
							layoutGraph();
							a_datagenerator.setEnabled(true);
							m_Instances = null;;
							a_learn.setEnabled(false);
							a_learnCPT.setEnabled(false);

							dlg.setVisible(false);
						} catch (Exception e) {
							e.printStackTrace();
						}
					}