Java Swing Border createRightBorder(int size, Color color)

Here you can find the source of createRightBorder(int size, Color color)

Description

create Right Border

License

Open Source License

Declaration

public static Border createRightBorder(int size, Color color) 

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 createRightBorder(int size) {
        return createRightBorder(size, null);
    }//  w  w w . ja va 2 s. co m

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

Related

  1. copy(final Border border)
  2. createCompoundBorder(Border... borders)
  3. createDebugBorder(JComponent c, Color color)
  4. createFormSectionBorder(Color color, String title)
  5. createJScrollPane(Component component, Rectangle bounds, Color backgroundColor, boolean noBorder, boolean visible)
  6. createRoundedEmptyBorder(final int top, final int left, final int bottom, final int right, final int arc, final Color color)
  7. createTitledBorder(Color color, String name)
  8. createVerticalBox(Border border, Component... comps)
  9. drawBorderTrans(Graphics2D g, JComponent focusOwner, JComponent area)