create Compound Border - Java Swing

Java examples for Swing:Border

Description

create Compound Border

Demo Code


//package com.java2s;
import javax.swing.BorderFactory;

import javax.swing.border.Border;

public class Main {
    public static Border createCompoundBorder(Border border1,
            Border border2, boolean border2Inside) {
        if (border2Inside) {
            return BorderFactory.createCompoundBorder(border1, border2);
        } else {//from   w  ww .j  a  v  a  2 s  . c  o  m
            return BorderFactory.createCompoundBorder(border2, border1);
        }
    }
}

Related Tutorials