Java JPanel Create createGridedJPanel(JComponent parent, int columns)

Here you can find the source of createGridedJPanel(JComponent parent, int columns)

Description

create Grided J Panel

License

Open Source License

Return

A ed JPanel with the given number of columns.

Declaration

public static JPanel createGridedJPanel(JComponent parent, int columns) 

Method Source Code


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

import java.awt.*;

import javax.swing.*;

public class Main {
    /**/*from w  w  w  .j  a  v a2s  . com*/
     * @return A {@link GridLayout}ed JPanel with the given number of
     * columns.
     */
    public static JPanel createGridedJPanel(JComponent parent, int columns) {
        JPanel panel = new JPanel(new GridLayout(0, columns));
        parent.add(panel);
        return panel;
    }
}

Related

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