stateMachineList.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { stateMachineListActionPerformed(evt); } });
  private void initComponents() {    java.awt.GridBagConstraints gridBagConstraints;    domainLabel = new javax.swing.JLabel();    destinationLabel = new javax.swing.JLabel();    filenameField = new javax.swing.JTextField();    generateButton = new javax.swing.JButton();    cancelButton = new javax.swing.JButton();    domainList = new javax.swing.JComboBox();    statechartLabel = new javax.swing.JLabel();    stateMachineList = new javax.swing.JComboBox();    getContentPane().setLayout(new java.awt.GridBagLayout());    setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);    setTitle("Generate Statechart");    setName("Generate Statechart");    addWindowListener(new java.awt.event.WindowAdapter() {      public void windowOpened(java.awt.event.WindowEvent evt) {        formWindowOpened(evt);      }    });    domainLabel.setText("Domain:");    gridBagConstraints = new java.awt.GridBagConstraints();    gridBagConstraints.gridx = 0;    gridBagConstraints.gridy = 0;    gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;    getContentPane().add(domainLabel, gridBagConstraints);    destinationLabel.setText("Output Filename:");    gridBagConstraints = new java.awt.GridBagConstraints();    gridBagConstraints.gridx = 0;    gridBagConstraints.gridy = 3;    gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;    getContentPane().add(destinationLabel, gridBagConstraints);    filenameField.setText("statechart.png");    filenameField.setPreferredSize(new java.awt.Dimension(300, 20));    gridBagConstraints = new java.awt.GridBagConstraints();    gridBagConstraints.gridx = 1;    gridBagConstraints.gridy = 3;    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;    gridBagConstraints.anchor = java.awt.GridBagConstraints.FIRST_LINE_START;    gridBagConstraints.weightx = 1.0;    getContentPane().add(filenameField, gridBagConstraints);    generateButton.setMnemonic('G');    generateButton.setText("Generate");    generateButton.setActionCommand("generate");    generateButton.addActionListener(new java.awt.event.ActionListener() {      public void actionPerformed(java.awt.event.ActionEvent evt) {        generateButtonActionPerformed(evt);      }    });    gridBagConstraints = new java.awt.GridBagConstraints();    gridBagConstraints.gridx = 0;    gridBagConstraints.gridy = 4;    gridBagConstraints.anchor = java.awt.GridBagConstraints.FIRST_LINE_START;    getContentPane().add(generateButton, gridBagConstraints);    cancelButton.setMnemonic('C');    cancelButton.setText("Cancel");    cancelButton.setActionCommand("cancel");    cancelButton.addActionListener(new java.awt.event.ActionListener() {      public void actionPerformed(java.awt.event.ActionEvent evt) {        cancelButtonActionPerformed(evt);      }    });    gridBagConstraints = new java.awt.GridBagConstraints();    gridBagConstraints.gridx = 1;    gridBagConstraints.gridy = 4;    gridBagConstraints.anchor = java.awt.GridBagConstraints.FIRST_LINE_START;    getContentPane().add(cancelButton, gridBagConstraints);    domainList.setPreferredSize(new java.awt.Dimension(300, 20));    domainList.addActionListener(new java.awt.event.ActionListener() {      public void actionPerformed(java.awt.event.ActionEvent evt) {        domainListActionPerformed(evt);      }    });    gridBagConstraints = new java.awt.GridBagConstraints();    gridBagConstraints.gridx = 1;    gridBagConstraints.gridy = 0;    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;    gridBagConstraints.anchor = java.awt.GridBagConstraints.FIRST_LINE_START;    getContentPane().add(domainList, gridBagConstraints);    statechartLabel.setText("State Machine:");    gridBagConstraints = new java.awt.GridBagConstraints();    gridBagConstraints.gridx = 0;    gridBagConstraints.gridy = 2;    gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;    getContentPane().add(statechartLabel, gridBagConstraints);    stateMachineList.setPreferredSize(new java.awt.Dimension(300, 20));    gridBagConstraints = new java.awt.GridBagConstraints();    gridBagConstraints.gridx = 1;    gridBagConstraints.gridy = 2;    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;    getContentPane().add(stateMachineList, gridBagConstraints);    pack();  }