Java Swing BoxLayout createPanelWithBoxLayout()

Here you can find the source of createPanelWithBoxLayout()

Description

create Panel With Box Layout

License

Open Source License

Declaration

public static JPanel createPanelWithBoxLayout() 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

import javax.swing.BoxLayout;

import javax.swing.JPanel;

public class Main {
    public static JPanel createPanelWithBoxLayout() {
        final JPanel mainPanel = new JPanel();
        final BoxLayout layout = new BoxLayout(mainPanel, BoxLayout.Y_AXIS);

        mainPanel.setLayout(layout);//w  w  w .  ja  v  a 2s .  c om
        return mainPanel;
    }
}

Related

  1. createBoxPanel(int orientation)
  2. createHorizontalBox(int[] ratios, Component... comps)
  3. createHorizontalBoxLayout(Component... components)
  4. createNorthPanel(JComponent p)
  5. createPanelBoxLayout(Component... components)
  6. createTitledPanel(JComponent component, String title)
  7. createTopAndCenter(JComponent top, JComponent center)
  8. createVertBox(Component... comps)
  9. createVerticalBox(Component... comps)