Java tutorial
//package com.java2s; import java.awt.GridBagConstraints; public class Main { public static GridBagConstraints getGridBagConstraints(int gridX, int gridY, int gridWidth, int gridHeight, int fill, int anchor) { GridBagConstraints gbc = new GridBagConstraints(); gbc.gridx = gridX; gbc.gridy = gridY; gbc.gridwidth = gridWidth; gbc.gridheight = gridHeight; gbc.fill = fill; gbc.anchor = anchor; return gbc; } }