Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

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

public class Main {
    /**
     * Custom creation method for {@link GridBagConstraints}.
     */
    public static GridBagConstraints createCustomGBC(final int x, final int y, final double weightx,
            final int fill) {
        final GridBagConstraints gbc = createCustomGBC(x, y);
        gbc.weightx = weightx;
        gbc.fill = fill;
        return gbc;
    }

    /**
     * Custom creation method for {@link GridBagConstraints}.
     */
    public static GridBagConstraints createCustomGBC(final int x, final int y) {
        final GridBagConstraints gbc = new GridBagConstraints();
        gbc.gridx = x;
        gbc.gridy = y;
        return gbc;
    }
}