title: Java synth - How to apply solid color to button background
body: <p>I am trying to obtain simple flat button using synth xml in Java. This button should contain solid color background and text with no other effects.</p>
  
  <p>I have checked some tutorials and successfully implemented below solution where I will need to provide the solid color background image for the button.</p>
  
  <pre><code>    &lt;state&gt;
          &lt;imagePainter method="buttonBackground" path="images/button_press.png" sourceInsets="10 10 10 10"/&gt;
          &lt;font name="Dialog" size="16"/&gt;
          &lt;color type="TEXT_FOREGROUND" value="#FFFFFF"/&gt;
      &lt;/state&gt;
  </code></pre>
  
  <p>But as per synth documentation <a href="https://docs.oracle.com/javase/8/docs/api/javax/swing/plaf/synth/doc-files/synthFileFormat.html#e.color" rel="nofollow">here</a> I should be able to provide the Background color to the button instead of using an image. I have tried below XML settings for the same. But it is not applying any background to buttons. Whereas it is applying provided color to text.</p>
  
  <pre><code>    &lt;state&gt;
          &lt;font name="Verdana" size="14"/&gt;
          &lt;color value="#FF0000" type="BACKGROUND"/&gt;
          &lt;color value="#000000" type="TEXT_FOREGROUND"/&gt;
      &lt;/state&gt;
  </code></pre>
  
  <p>Can anyone check and help me find out the mistake I have done or there is any other solution for this?</p>