Java JPanel Create createFlowJPanelLeft(JComponent parent, int alignment)

Here you can find the source of createFlowJPanelLeft(JComponent parent, int alignment)

Description

create Flow J Panel Left

License

Open Source License

Return

A ed JPanel.

Declaration

private static JPanel createFlowJPanelLeft(JComponent parent, int alignment) 

Method Source Code


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

import java.awt.*;

import javax.swing.*;

public class Main {
    /**/*from   www . j av  a 2s  .c  o  m*/
     * @return A {@link FlowLayout}ed JPanel.
     */
    private static JPanel createFlowJPanelLeft(JComponent parent, int alignment) {
        JPanel panel = new JPanel(new FlowLayout(alignment, 0, 3));
        parent.add(panel);
        return panel;
    }

    /**
     * @return A {@link FlowLayout}ed JPanel aligned to the left.
     */
    public static JPanel createFlowJPanelLeft(JComponent parent) {
        return createFlowJPanelLeft(parent, FlowLayout.LEFT);
    }
}

Related

  1. createBlankColorPanel(int height, int width, Color bkColor)
  2. createCenteredWindow(String title, Dimension size, JPanel panel, boolean exitOnClose)
  3. createGridedJPanel(JComponent parent, int columns)
  4. createJPanel()
  5. createJPanel(String name, LayoutManager lm, ComponentListener cl)
  6. createPaletteJPanel(String title)