private void assignActionsToButtons() {

        glGlun.getDocument().addDocumentListener(new DocumentListener() {
          public void changedUpdate(DocumentEvent e) {
              updateButtonStates();
          }
          public void removeUpdate(DocumentEvent e) {
              updateButtonStates();
          }
          public void insertUpdate(DocumentEvent e) {
              updateButtonStates();
          }
        });
        bLoadFtedat.addActionListener(new ActionListener() {

            @Override
            public void actionPerformed(ActionEvent arg0) {
                File f = FileUtil.showFtedatLoadDialog(controlPanel);
                if(f != null) {
                    ftedat = f;
                    ftedatLocation.setText(ftedat.getAbsolutePath());
                    updateButtonStates();
                }

            }

        });

        bLoad.addActionListener(new ActionListener() {

            public void actionPerformed(ActionEvent e) {
                File f = FileUtil.showSavegameLoadDialog(controlPanel);
                if(f != null) {
                    savegame = f;
                    savegameLocation.setText(savegame.getAbsolutePath());
                    updateButtonStates();
                    parseFile();
                }
            }
        });

        bRetry.addActionListener(new ActionListener() {

            public void actionPerformed(ActionEvent e) {
                if(savegame.getAbsolutePath().endsWith(".dat")) {
                    parseFile();
                } else {
                    JOptionPane.showMessageDialog(controlPanel, "Something derped! Please try to select the file again.", "Derp", JOptionPane.WARNING_MESSAGE);
                }
            }
        });

        bSave.addActionListener(new ActionListener() {

            public void actionPerformed(ActionEvent e) {
                try {
                    editor.applyAllChanges();
                } catch(Exception ex) {
                    MessageUtil.error("Failed to Save:\n\n" + ex.getClass().toString() + ": " + ex.getMessage());
                    return;
                }

                File f = FileUtil.showSaveDialog(controlPanel, savegame);
                if(f != null) {
                    storeFile(f);
                }
            }
        });

    }