public void handleSaveButton() {
        int index = transitionView.getTransitionList().getSelectedIndex();
        if (index != -1){
            String currentState = transitionView.getCurrentState().getText();
            String currentSymbol = transitionView.getCurrentAlphabet().getText(); 
            String switchTo = (String)transitionView.getStateComboBox().getSelectedItem();
            String write = (String)transitionView.getSymbolComboBox().getSelectedItem();
            String move = (String)transitionView.getDirectionComboBox().getSelectedItem();
            String currentTransition = new String("["+currentState+"] "+"["+currentSymbol+"] => ");

            aTuringMachine.getTransitions().get(currentState).get(currentSymbol).put("switchTo", switchTo);
            currentTransition += new String("[" + switchTo + "] ");
            if((switchTo == "ACCEPT") || (switchTo == "REJECT")){
                aTuringMachine.getTransitions().get(currentState).get(currentSymbol).put("write", write);
                aTuringMachine.getTransitions().get(currentState).get(currentSymbol).put("move", "Neutral");                   
            }
            else{
                aTuringMachine.getTransitions().get(currentState).get(currentSymbol).put("write", write);
                currentTransition += new String("[" + write + "] ");
                aTuringMachine.getTransitions().get(currentState).get(currentSymbol).put("move", move);   
                currentTransition += new String("[" + move + "] ");
            }
            transitionView.getTransitionItems().add(index, (String)currentTransition);
            transitionView.getTransitionItems().remove(index+1);
            boolean button = true;
            for(Object a: aTuringMachine.getStates()){
                for(Object b: aTuringMachine.getTapeAlphabet()){
                    if (aTuringMachine.getTransitions().get(a).get(b).isEmpty())
                        button = false;
                }
            }
            transitionView.getNextButton().setEnabled(button);
            
            if(index < transitionView.getTransitionItems().size()){
            	transitionView.getTransitionList().setSelectedIndex(index+1);
            }
        }
    }