jframe border

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

Also in Java: