Java examples for Swing:Layout Manager
Creates a JPanel with a vertically-oriented BoxLayout.
//package com.java2s; import javax.swing.*; public class Main { /** Creates a JPanel with a vertically-oriented BoxLayout. */ public static JPanel makeVerticalFlowPanel() { JPanel result = new JPanel(); result.setLayout(new BoxLayout(result, BoxLayout.Y_AXIS)); return result; }/* www .j a v a 2 s. c o m*/ }