public void init() {
    setLayout(new BoxLayout(this, BoxLayout.X_AXIS));

    JLabel nameLabel = new JLabel(getFieldName());
    valueField = new JPanel();
    valueField.setPreferredSize(new Dimension(10, 10));

    add(valueField);
    add(nameLabel);
    revalidate();
    repaint();
  }
 @Override
 public void setValue(final boolean value) {
   this.value = value;
   valueField.setBackground(value ? colorOnTrue.getValue() : colorOnFalse.getValue());
   repaint();
 }