Here you can find the source of createBoxPanel(int axis)
static public JPanel createBoxPanel(int axis)
//package com.java2s; import javax.swing.BoxLayout; import javax.swing.JPanel; public class Main { /** Creates a new JPanel with a BoxLayout. axis is BosLayout.{X|Y}_AXIS. *//* w ww . j a v a 2s.co m*/ static public JPanel createBoxPanel(int axis) { JPanel panel = new JPanel(); panel.setLayout(new BoxLayout(panel, axis)); return panel; } }