title: Rounded Border on one side only java
body: <p>I need to create a rounded border on <strong>one side</strong> of a component only.</p>
  
  <p>This code creates a rounded border:</p>
  
  <pre><code>  new LineBorder(Color.RED, 3, true)
  </code></pre>
  
  <p>I have seen <a href="https://stackoverflow.com/questions/2174319/is-it-possible-to-have-a-java-swing-border-only-on-the-top-side">this thread</a> which shows you how to create a matte border that can be used on one side of a component only, however a matte border isn't rounded.</p>
  
  <p>Is it possible to have a rounded border on one side only?</p>
  
  <p><strong>Edit:</strong></p>
  
  <p>I have tried using compound border like this:</p>
  
  <pre><code>    cell.setBorder(BorderFactory.createCompoundBorder(
          new LineBorder(borderColor, 3, true),
          BorderFactory.createMatteBorder(0, 3, 0, 0, Color.black)));
  </code></pre>
  
  <p>But it doesn't work...</p>