Java JPanel Layout getJPanel(LayoutManager man)

Here you can find the source of getJPanel(LayoutManager man)

Description

get J Panel

License

Academic Free License

Declaration

public static JPanel getJPanel(LayoutManager man) 

Method Source Code


//package com.java2s;
//License from project: Academic Free License 

import java.awt.Color;
import java.awt.Component;

import java.awt.LayoutManager;

import javax.swing.JPanel;

public class Main {
    public static Color BACKGROUND = new Color(35, 34, 32);

    public static JPanel getJPanel(LayoutManager man) {
        JPanel panel = new JPanel(man);

        panel.setBackground(BACKGROUND);

        return panel;
    }/*from w  w w . j  a  v  a  2s .  c  om*/

    public static void setBackground(Component comp) {
        comp.setBackground(BACKGROUND);
    }
}

Related

  1. constrain(Component component, JPanel panel, GridBagLayout layout, GridBagConstraints constraints, int gridx, int gridwidth, int weightx, int gridy, int gridheight, int weighty, int fill, int anchor)
  2. doLayout(JPanel parentContainer, Component[] components, int numberOfColumns, double[] weightsX, double[] weightsY)
  3. formGridInColumn(JPanel panel, int rows, int cols)
  4. layoutDualPanel(JPanel bean, JLabel[] labels, JComponent[] components, JLabel tLabel, JComponent tComp, JLabel rLabel, JComponent rComp)
  5. makeCompactGrid(JPanel jMainGridPanel, SpringLayout layout, int rows, int cols, int initialX, int initialY, int xPad, int yPad)
  6. setBoxXLayout(JPanel p)
  7. setGBLayout(JPanel panel, int[] columnWidths, int[] rowHeights, double[] columnWeights, double[] rowWeights)