create Swing Box - Java Swing

Java examples for Swing:BoxLayout

Description

create Swing Box

Demo Code


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

import java.awt.*;

public class Main {
    public static Box createBox(int axis, Component... comps) {
        Box r = new Box(axis);
        for (Component comp : comps) {
            r.add(comp);/*  www .  j  a  v  a2  s  . c o m*/
        }
        return r;
    }
}

Related Tutorials