Search code examples
javaswingjlistnimbus

Making the first and last JList item highlight squared


I'm using the Nimbus look and feel. When I have a JList and I select the first or the last item the highlight is rounded. Normally it's a square shape.

enter image description here

How do I change it to square as the other elements?


Solution

  • I had accidentally changed the BorderFactory to use Line Border with rounded corners. After removing this the cells appeared correctly.