I'm wondering if it is possible to adjust the thickness of a border around a JPanel in Java? I currently have a border defined and the JPanel adds the border around it but I would like it to be a little thicker:
Border border;
JPanel panel;
border = BorderFactory.creatLineBorder(Color.RED);
panel = new JPanel();
panel.setBorder(border);
I believe you could use BorderFactory
panel.setBorder(BorderFactory.createStrokeBorder(new BasicStroke(5.0f)));
See
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With