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

Code Example 1

YourFrame.getRootPane().setBorder(
  	BorderFactory.createMatteBorder(4, 4, 4, 4, Color.RED));

Learn ReactJs, React Native from akashmittal.com