Here you can find the source of createVerticalBox(Component... cs)
public static Box createVerticalBox(Component... cs)
//package com.java2s; import java.awt.Component; import javax.swing.Box; public class Main { public static Box createVerticalBox(Component... cs) { Box box = Box.createVerticalBox(); for (Component c : cs) box.add(c);/*w ww . java 2 s . c om*/ return box; } }