});
KnowledgeFlowApp.addStartupListener(new weka.gui.beans.StartUpListener() {
public void startUpComplete() {
if (m_KnowledgeFlowFrame == null) {
final KnowledgeFlowApp kna = KnowledgeFlowApp.getSingleton();
m_KnowledgeFlowBut.setEnabled(false);
if (m_pendingKnowledgeFlowLoad != null &&
m_pendingKnowledgeFlowLoad.length() > 0) {
KnowledgeFlowApp.getSingleton().
loadLayout(new File(m_pendingKnowledgeFlowLoad), true);
m_pendingKnowledgeFlowLoad = null;
}
m_KnowledgeFlowFrame = new JFrame("Weka KnowledgeFlow Environment");
m_KnowledgeFlowFrame.setIconImage(m_Icon);
m_KnowledgeFlowFrame.getContentPane().setLayout(new BorderLayout());
m_KnowledgeFlowFrame.getContentPane()
.add(kna, BorderLayout.CENTER);
m_KnowledgeFlowFrame.addWindowListener(new WindowAdapter() {
public void windowClosing(WindowEvent w) {
kna.closeAllTabs();
kna.clearLayout(); // add a single "Untitled" tab ready for next time
m_KnowledgeFlowFrame.dispose();
m_KnowledgeFlowFrame = null;
m_KnowledgeFlowBut.setEnabled(true);
checkExit();
}