Here you can find the source of buildInfoPanelEmptyBorderScroll(final JComponent content)
public static JComponent buildInfoPanelEmptyBorderScroll(final JComponent content)
//package com.java2s; /******************************************************************************* * Copyright (c) 2015, 2017 Lablicate GmbH. * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors:/*w w w . ja v a 2 s. co m*/ * Dr. Alexander Kerner - initial API and implementation *******************************************************************************/ import java.awt.BorderLayout; import javax.swing.BorderFactory; import javax.swing.JComponent; import javax.swing.JPanel; import javax.swing.JScrollPane; public class Main { public static JComponent buildInfoPanelEmptyBorderScroll(final JComponent content) { final JPanel result = new JPanel(new BorderLayout()); result.setBorder(BorderFactory.createEmptyBorder()); final JScrollPane scroll = new JScrollPane(content); result.add(scroll, BorderLayout.CENTER); return result; } public static JComponent buildInfoPanelEmptyBorderScroll(final JComponent content, final int top, final int left, final int bottom, final int right) { final JPanel result = new JPanel(new BorderLayout()); result.setBorder(BorderFactory.createEmptyBorder(top, left, bottom, right)); final JScrollPane scroll = new JScrollPane(content); result.add(scroll, BorderLayout.CENTER); return result; } }