Java Swing Empty Border createInnerBorder(int size)

Here you can find the source of createInnerBorder(int size)

Description

create Inner Border

License

Open Source License

Declaration

public static Border createInnerBorder(int size) 

Method Source Code


//package com.java2s;
//License from project: Open Source License 

import java.awt.Color;
import javax.swing.BorderFactory;
import javax.swing.border.Border;

public class Main {
    public static Border createInnerBorder(int size) {
        return createInnerBorder(size, null);
    }//from w  ww .  j av a 2  s .c o  m

    public static Border createInnerBorder(int size, Color color) {
        if (color != null) {
            return BorderFactory.createMatteBorder(size, 0, size, 0, color);
        }
        return BorderFactory.createEmptyBorder(size, 0, size, 0);
    }
}

Related

  1. buildInfoPanelEmptyBorderScroll(final JComponent content)
  2. buildPanelEmptyBorder(final JComponent content, final int top, final int left, final int bottom, final int right)
  3. contentPaneBorder(JComponent component)
  4. correctBorder(final JComponent comp)
  5. createEmptyBorder(int size)
  6. getAlignBorder()
  7. getBigBorder()
  8. getDefaultEmptyBorder()
  9. getEmpty5Border()