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):

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