@Override
    public void actionPerformed(ActionEvent e)
      {

        JButton source = (JButton) e.getSource();

        //if (e.getStateChange() == ItemEvent.SELECTED) {
        list = (map.get(source));
        incr++;
        //}
        source.setIcon(new javax.swing.ImageIcon(getClass().getResource("/frontend/resources/circle_red.png")));
        source.setPreferredSize(new Dimension(20, 10));

        if (incr == 1)
        {
            ini_line = list.get(0);
        }
        fin_line = list.get(0);
        if (incr == 2)
        {
            incr = 0;
            Set<JButton> checklist = map.keySet();
            Iterator itr = checklist.iterator();
            while (itr.hasNext())
            {
                JButton b = (JButton) itr.next();
                if (b.getIcon() == null)
                {
                    b.setEnabled(false);
                }
            }

        }

        if (ini_line > fin_line)
        {
            int t = ini_line;
            ini_line = fin_line;
            fin_line = t;
        }

        handlers.assignIniFin(ini_line.intValue(), fin_line.intValue());
      }