Java Swing Empty Border addBorderSpaces(JComponent com)

Here you can find the source of addBorderSpaces(JComponent com)

Description

add Border Spaces

License

Open Source License

Declaration

public static void addBorderSpaces(JComponent com) 

Method Source Code

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

import javax.swing.BorderFactory;
import javax.swing.JComponent;

public class Main {
    public static void addBorderSpaces(JComponent com) {
        com.setBorder(/*from   www.  ja  va  2s . c o m*/
                BorderFactory.createCompoundBorder(com.getBorder(), BorderFactory.createEmptyBorder(2, 4, 2, 4)));
    }
}

Related

  1. addBorder(JComponent target, Border add)
  2. addEmptyBorder(JComponent c, int i)
  3. addMarginAndBorder(JComponent component, int margin)
  4. blankBorder(int top, int left, int bottom, int right)
  5. borderlessScrollPane(final Component component)