Java tutorial
//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; } }