Java Swing Bevel Border setPaddedRaisedBevelBorder(JComponent component, int top, int left, int bottom, int right)

Here you can find the source of setPaddedRaisedBevelBorder(JComponent component, int top, int left, int bottom, int right)

Description

set Padded Raised Bevel Border

License

Open Source License

Declaration

public static void setPaddedRaisedBevelBorder(JComponent component, int top, int left, int bottom, int right) 

Method Source Code

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

import javax.swing.BorderFactory;

import javax.swing.JComponent;

public class Main {
    private static final int DEFAULT_BORDER_PADDING = 6;

    public static void setPaddedRaisedBevelBorder(JComponent component) {
        setPaddedRaisedBevelBorder(component, DEFAULT_BORDER_PADDING, DEFAULT_BORDER_PADDING,
                DEFAULT_BORDER_PADDING, DEFAULT_BORDER_PADDING);
    }//from   w w  w .  j a v a  2  s.co m

    public static void setPaddedRaisedBevelBorder(JComponent component, int padding) {
        setPaddedRaisedBevelBorder(component, padding, padding, padding, padding);
    }

    public static void setPaddedRaisedBevelBorder(JComponent component, int vertical, int horizontal) {
        setPaddedRaisedBevelBorder(component, vertical, horizontal, vertical, horizontal);
    }

    public static void setPaddedRaisedBevelBorder(JComponent component, int top, int left, int bottom, int right) {
        component.setBorder(BorderFactory.createCompoundBorder(BorderFactory.createRaisedBevelBorder(),
                BorderFactory.createEmptyBorder(top, left, bottom, right)));
    }
}

Related

  1. createCompoundBevelBorder()
  2. createWidgetBorder()
  3. getDefaultBorder()
  4. getNativeLoweredBorder()
  5. getToolBorder()