Java Swing FlowLayout addToFlowLayout(JComponent comp, int flowLayoutAlignment)

Here you can find the source of addToFlowLayout(JComponent comp, int flowLayoutAlignment)

Description

add To Flow Layout

License

Apache License

Declaration

public static JPanel addToFlowLayout(JComponent comp, int flowLayoutAlignment) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

import java.awt.FlowLayout;

import javax.swing.JComponent;
import javax.swing.JPanel;

public class Main {
    public static JPanel addToFlowLayout(JComponent comp, int flowLayoutAlignment) {
        JPanel panel = new JPanel(new FlowLayout(flowLayoutAlignment));
        panel.add(comp);//from  w  w  w  .  j av a2s  .  co m
        return panel;
    }
}

Related

  1. createPanel(LayoutManager layout, Component... components)
  2. flowLayoutPanel(Component... components)
  3. getFlowLayoutPanelLeftAligned(String title, Component component)
  4. layoutFlow(JComponent... list)