Java JPanel Create createVerticalBoxJPanel(JComponent parent)

Here you can find the source of createVerticalBoxJPanel(JComponent parent)

Description

create Vertical Box J Panel

License

Open Source License

Return

A vertical ed JPanel.

Declaration

public static JPanel createVerticalBoxJPanel(JComponent parent) 

Method Source Code

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

import javax.swing.*;

public class Main {
    /**//from   ww  w .j  a  va 2 s  .co m
     * @return A vertical {@link BoxLayout}ed JPanel.
     */
    public static JPanel createVerticalBoxJPanel(JComponent parent) {
        JPanel panel = new JPanel();
        panel.setLayout(new BoxLayout(panel, BoxLayout.Y_AXIS));
        parent.add(panel);
        return panel;
    }
}

Related

  1. createGridedJPanel(JComponent parent, int columns)
  2. createJPanel()
  3. createJPanel(String name, LayoutManager lm, ComponentListener cl)
  4. createPaletteJPanel(String title)
  5. createStandardJPanel()
  6. initPanel(Color color)
  7. newJPanel(Component... c)
  8. newJPanel(int layoutAxis, Component... components)
  9. setJPanelOpaque(JPanel p, boolean opaque)