public void initPanels(){
        
        this.removeAll();
        List<String> ids = Application.mediator.automatonTable.ids;
        List<Point> points =  Application.mediator.automatonTable.points;
        List<boolean[]> codes = Application.mediator.automatonTable.codes;
        int x = R*2;
        int y = R*2;
        StateMouseListener mListener = new StateMouseListener();
        
        for (int i = 0; i < ids.size(); i++) {
            StatePanel panel = new StatePanel("Z"+String.valueOf(i), ids.get(i));
            if(codes != null){
                panel.setCode(SynchroState.codeToString(codes.get(i)));
            }
            panel.addMouseMotionListener(mListener);
            panel.addMouseListener(mListener);
            
            if(ids.size() != points.size()){
                panel.setLocation(x, y);
                x += R*8;
                if(x >  Application.mediator.automatonFrame.getWidth()){
                    x = R*2;
                    y += R*4;
                }
            }else{
                panel.setLocation(points.get(i));
            }
            statePanels.put(i, panel);
            this.add(panel);
        }
        
    }