how to make border in java code example Example: how to create a border in a a jframe .setBorder(BorderFactory.createMatteBorder(4, 4, 4, 4, Color.RED));