public void setEditedBlock(JBlock b) {
        if(b==editing) return ;
        editing=(logoBlock)b;
        reset();
        for(ComboText c: commands){
            if(c.getValue().equals(editing.command)){
                command.setSelectedItem(c);
                break;
            }
        }
        logoObj.setText(editing.obj);
        String c=((ComboText)command.getSelectedItem()).getValue();
        if(c.equals("forward") || c.equals("backward")
                || c.equals("turnRight") || c.equals("turnLeft")){
            value.setText(""+editing.data[0]);
        }
        if(c.equals("MAKE")){
            makeW.setValue(editing.data[0]);
            makeH.setValue(editing.data[1]);
            closedCanvas.setSelected(editing.data[2].equals(true));
        }
        if(c.equals("setColor")){
            colorHEX.setText(editing.data[0].toString());
        }
    }