Java examples for Swing:GridBagLayout
Custom creation method for GridBagConstraints .
//package com.java2s; import java.awt.GridBagConstraints; public class Main { /**/*from w ww . j a v a 2 s . c o m*/ * 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; } }