Explicit Java Rounded Error

I am working on a GUI in Java and I am trying to give rounded corners to my borders.

JPanel recentProjectsPanel = new JPanel();
    recentProjectsPanel.setLayout(new BorderLayout());
    recentProjectsPanel.setBackground(Color.red);
    recentProjectsPanel.setBorder(new LineBorder(Color.green, 15, true));

This is the result that I get (ignore the colors):

Failing Border GUI

Why am I getting these red stripes in the corners? Any way to fix this?

+5
source share
2 answers

Instead, you can use the option TextBubbleBorder.

Qrlyr.png

+3
source

Look at this

Java - rounded corner panel with layout in paintComponent

it has a lot of information on the same.

+2
source

All Articles