Java Swing BoxLayout createBoxPanel(int axis)

Here you can find the source of createBoxPanel(int axis)

Description

Creates a new JPanel with a BoxLayout.

License

Open Source License

Declaration

static public JPanel createBoxPanel(int axis) 

Method Source Code

//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;
    }
}

Related

  1. createBox(int axis, Object... children)
  2. createBox(int orientation, JComponent... components)
  3. createBoxFiller()
  4. createBoxLayout(Container container, int axis, Component... components)
  5. createBoxLayoutPanel(boolean vertical)
  6. createBoxPanel(int orientation)
  7. createHorizontalBox(int[] ratios, Component... comps)
  8. createHorizontalBoxLayout(Component... components)
  9. createNorthPanel(JComponent p)