package net.sf.kerner.utils.swing.impl.util;

import java.awt.BorderLayout;

import javax.swing.BorderFactory;
import javax.swing.JComponent;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.SwingConstants;

public class UtilSwing {

    public static JComponent buildInfoPanelTextBorder(final JComponent content, final String title) {
        final JPanel result = new JPanel(new BorderLayout());
        result.setBorder(BorderFactory.createTitledBorder(title));
        result.add(content, BorderLayout.CENTER);
        return result;
    }

    public static JComponent buildInfoPanelTextBorder(final JLabel content, final String title) {
        content.setHorizontalAlignment(SwingConstants.CENTER);
        content.setVerticalAlignment(SwingConstants.CENTER);
        content.setOpaque(true);
        return buildInfoPanelTextBorder((JComponent) content, title);
    }

    public static JComponent buildInfoPanelTextBorderScroll(final JComponent content, final String title) {
        final JPanel result = new JPanel(new BorderLayout());
        result.setBorder(BorderFactory.createTitledBorder(title));
        final JScrollPane scroll = new JScrollPane(content);
        result.add(scroll, BorderLayout.CENTER);
        return result;
    }

    private UtilSwing() {
    }

}

@@ -283,16 +283,822 @@
 wing %7B%0A%0A
+    public static JComponent buildInfoPanelEmptyBorderScroll(final JComponent content) %7B%0A        final JPanel result = new JPanel(new BorderLayout());%0A        result.setBorder(BorderFactory.createEmptyBorder());%0A        final JScrollPane scroll = new JScrollPane(content);%0A        result.add(scroll, BorderLayout.CENTER);%0A        return result;%0A    %7D%0A%0A    public static JComponent buildInfoPanelEmptyBorderScroll(final JComponent content, final int top, final int left,%0A            final int bottom, final int right) %7B%0A        final JPanel result = new JPanel(new BorderLayout());%0A        result.setBorder(BorderFactory.createEmptyBorder(top, left, bottom, right));%0A        final JScrollPane scroll = new JScrollPane(content);%0A        result.add(scroll, BorderLayout.CENTER);%0A        return result;%0A    %7D%0A%0A
     publ
@@ -2105,24 +2105,409 @@
 ult;%0A    %7D%0A%0A
+    public static JComponent buildPanelEmptyBorder(final JComponent content, final int top, final int left,%0A            final int bottom, final int right) %7B%0A        final JPanel result = new JPanel(new BorderLayout());%0A        result.setBorder(BorderFactory.createEmptyBorder(top, left, bottom, right));%0A%0A        result.add(content, BorderLayout.CENTER);%0A        return result;%0A    %7D%0A%0A
     private 

Add some SwingUtil stuff.