Check out example codes for "jbutton border size java". It will help you in understanding the concepts better.

Code Example 1

Border border = new LineBorder(Color.WHITE, 12);
JButton button = new JButton("12 Pixel");

button.setBorder(border);

Learn ReactJs, React Native from akashmittal.com