void saveFormtoState()
    {
        state.getState_Properties().setName(textName.getText());
        state.setIsFinalState(checkAccept.isSelected());
        if(checkStart.isSelected())
            dFAMainWin.getDfaSim().getDfa().setStartState(state);
        else if(state.getIsStartState())
            dFAMainWin.getDfaSim().getDfa().setStartState(null);
        editedOK = true;
        setVisible(false);
        dFAMainWin.repaint();
        dispose();
    }