Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
import java.awt.BorderLayout;

import javax.swing.JComponent;

import javax.swing.JPanel;

public class Main {
    /**
     * Creates a JPanel containing the component hugging the bottom side
     * @param component the component to wrap
     * @return a JPanel containing the component hugging the bottom side
     */
    public static JPanel hugSouth(JComponent component) {
        final JPanel result = new JPanel(new BorderLayout());
        result.add(component, BorderLayout.SOUTH);
        return result;
    }
}