Java JPanel Create newJPanel(Component... c)

Here you can find the source of newJPanel(Component... c)

Description

new J Panel

License

Apache License

Declaration

public static JPanel newJPanel(Component... c) 

Method Source Code

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

import java.awt.Component;
import java.awt.FlowLayout;

import javax.swing.JPanel;

public class Main {
    public static JPanel newJPanel(Component... c) {
        JPanel p = new JPanel(new FlowLayout(FlowLayout.LEFT));
        for (int i = 0; i < c.length; i++)
            p.add(c[i]);//from  w w w. ja v  a2  s  .c  o m
        return p;
    }
}

Related

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