Here you can find the source of wrapInBorderPanel(final JComponent component)
Parameter | Description |
---|---|
component | component to be wrapped |
public static JPanel wrapInBorderPanel(final JComponent component)
//package com.java2s; //License from project: Apache License import java.awt.BorderLayout; import javax.swing.JComponent; import javax.swing.JPanel; public class Main { /**//from w w w. j a v a 2 s . co m * Wraps a component in a JPanel with {@link BorderLayout}. * @param component component to be wrapped * @return a JPanel with the specified component added to it */ public static JPanel wrapInBorderPanel(final JComponent component) { final JPanel panel = new JPanel(new BorderLayout()); panel.add(component); return panel; } }