private void addButtonsListeners()
    {
        btnAddAnswer.addActionListener(new ActionListener() {

            @Override
            public void actionPerformed(ActionEvent e) {
            	String answ = JOptionPane.showInputDialog("Podaj odpowiedź");
            	String answTest = answ;
            	if (answ.trim().length()>0) {
            		textAnswer.add(answ);
            		answers.addElement(textAnswer.get(answerTrigger));
            		answersComboBox.setSelectedIndex(answerTrigger);
            		answerTrigger++;	            		
            	} else {
            		JOptionPane.showMessageDialog(null, "Odpowiedź nie może być pusta!");
            	}
            }
        });
        
        btnEditAnswer.addActionListener(new ActionListener() {

            @Override
            public void actionPerformed(ActionEvent e) {
                int selectedIndex = answersComboBox.getSelectedIndex();
                if(selectedIndex!=-1){
                String tempAnswer=JOptionPane.showInputDialog("Podaj odpowiedÅº",textAnswer.get(selectedIndex));
                textAnswer.set(selectedIndex, tempAnswer);
                answers.removeAllElements();
                for(int i=0;i<textAnswer.size();i++)
                {
                    answers.addElement(textAnswer.get(i));
                }
                answersComboBox.setSelectedIndex(selectedIndex);
            }}
        });
        
        btnDeleteAnswer.addActionListener(new ActionListener() {

            @Override
            public void actionPerformed(ActionEvent e) {
                int selectedIndex = answersComboBox.getSelectedIndex();
                if(selectedIndex!=-1){
                textAnswer.remove(selectedIndex);
                answers.removeElementAt(selectedIndex);
                answerTrigger--;
                answersComboBox=new JComboBox(answers);}
            }
        });
    }