Example usage for javax.swing JLabel setBounds

List of usage examples for javax.swing JLabel setBounds

Introduction

In this page you can find the example usage for javax.swing JLabel setBounds.

Prototype

public void setBounds(int x, int y, int width, int height) 

Source Link

Document

Moves and resizes this component.

Usage

From source file:net.sourceforge.msscodefactory.cfsecurity.v2_0.CFSecuritySwing.CFSecuritySwingISOCountryCurrencyAttrJPanel.java

public CFSecuritySwingISOCountryCurrencyAttrJPanel(ICFSecuritySwingSchema argSchema,
        ICFSecurityISOCountryCurrencyObj argFocus) {
    super();//from  w ww .  j  ava  2 s.  c  o  m
    JLabel label;
    JComponent compo;
    CFJReferenceEditor reference;
    final String S_ProcName = "construct-schema-focus";
    if (argSchema == null) {
        throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), S_ProcName, 1,
                "argSchema");
    }
    // argFocus is optional; focus may be set later during execution as
    // conditions of the runtime change.
    swingSchema = argSchema;
    setSwingFocusAsISOCountryCurrency(argFocus);
    final int spacing = 5;
    int y = spacing;
    final int height = 25;
    final int textheight = 80;
    final int vspacing = height + spacing;
    final int textvspacing = textheight + spacing;
    final int labelx = spacing;
    final int labelwidth = 200;
    final int fieldx = labelx + labelwidth + spacing;
    final int fieldwidth = 785;
    final int panelwidth = fieldx + fieldwidth + spacing;
    // temporary -- I think you have to have a panel bigger than the coordinates initially
    setSize(panelwidth, 100000);

    label = getSwingLabelContainerCountry();
    add(label);
    label.setBounds(labelx, y, labelwidth, height);
    reference = getSwingReferenceContainerCountry();
    add(reference);
    reference.setBounds(fieldx, y, fieldwidth, height);
    y = y + vspacing;

    label = getSwingLabelParentCurrency();
    add(label);
    label.setBounds(labelx, y, labelwidth, height);
    reference = getSwingReferenceParentCurrency();
    add(reference);
    reference.setBounds(fieldx, y, fieldwidth, height);
    y = y + vspacing;

    // Now we can set the proper size based on the fields and references populated
    setSize(panelwidth, y);
    Dimension pfsz = new Dimension(panelwidth, y);
    setPreferredSize(pfsz);
    Dimension min = new Dimension(400, y);
    setMinimumSize(min);
    populateFields();
    adjustComponentEnableStates();
    swingIsInitializing = false;
}

From source file:net.sourceforge.msscodefactory.cfsecurity.v2_0.CFSecuritySwing.CFSecuritySwingISOCountryLanguageAttrJPanel.java

public CFSecuritySwingISOCountryLanguageAttrJPanel(ICFSecuritySwingSchema argSchema,
        ICFSecurityISOCountryLanguageObj argFocus) {
    super();/*  w  ww  .  j  a  v  a  2  s .  c  o m*/
    JLabel label;
    JComponent compo;
    CFJReferenceEditor reference;
    final String S_ProcName = "construct-schema-focus";
    if (argSchema == null) {
        throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), S_ProcName, 1,
                "argSchema");
    }
    // argFocus is optional; focus may be set later during execution as
    // conditions of the runtime change.
    swingSchema = argSchema;
    setSwingFocusAsISOCountryLanguage(argFocus);
    final int spacing = 5;
    int y = spacing;
    final int height = 25;
    final int textheight = 80;
    final int vspacing = height + spacing;
    final int textvspacing = textheight + spacing;
    final int labelx = spacing;
    final int labelwidth = 200;
    final int fieldx = labelx + labelwidth + spacing;
    final int fieldwidth = 785;
    final int panelwidth = fieldx + fieldwidth + spacing;
    // temporary -- I think you have to have a panel bigger than the coordinates initially
    setSize(panelwidth, 100000);

    label = getSwingLabelContainerCountry();
    add(label);
    label.setBounds(labelx, y, labelwidth, height);
    reference = getSwingReferenceContainerCountry();
    add(reference);
    reference.setBounds(fieldx, y, fieldwidth, height);
    y = y + vspacing;

    label = getSwingLabelParentLanguage();
    add(label);
    label.setBounds(labelx, y, labelwidth, height);
    reference = getSwingReferenceParentLanguage();
    add(reference);
    reference.setBounds(fieldx, y, fieldwidth, height);
    y = y + vspacing;

    // Now we can set the proper size based on the fields and references populated
    setSize(panelwidth, y);
    Dimension pfsz = new Dimension(panelwidth, y);
    setPreferredSize(pfsz);
    Dimension min = new Dimension(400, y);
    setMinimumSize(min);
    populateFields();
    adjustComponentEnableStates();
    swingIsInitializing = false;
}

From source file:net.sourceforge.msscodefactory.cfsecurity.v2_0.CFSecuritySwing.CFSecuritySwingISOCurrencyAttrJPanel.java

public CFSecuritySwingISOCurrencyAttrJPanel(ICFSecuritySwingSchema argSchema,
        ICFSecurityISOCurrencyObj argFocus) {
    super();//from ww w  .  j a  v a2 s. co  m
    JLabel label;
    JComponent compo;
    CFJReferenceEditor reference;
    final String S_ProcName = "construct-schema-focus";
    if (argSchema == null) {
        throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), S_ProcName, 1,
                "argSchema");
    }
    // argFocus is optional; focus may be set later during execution as
    // conditions of the runtime change.
    swingSchema = argSchema;
    setSwingFocusAsISOCurrency(argFocus);
    final int spacing = 5;
    int y = spacing;
    final int height = 25;
    final int textheight = 80;
    final int vspacing = height + spacing;
    final int textvspacing = textheight + spacing;
    final int labelx = spacing;
    final int labelwidth = 200;
    final int fieldx = labelx + labelwidth + spacing;
    final int fieldwidth = 785;
    final int panelwidth = fieldx + fieldwidth + spacing;
    // temporary -- I think you have to have a panel bigger than the coordinates initially
    setSize(panelwidth, 100000);

    label = getSwingLabelId();
    add(label);
    label.setBounds(labelx, y, labelwidth, height);
    compo = getSwingEditorId();
    add(compo);
    compo.setBounds(fieldx, y, fieldwidth, height);
    y = y + vspacing;

    label = getSwingLabelISOCode();
    add(label);
    label.setBounds(labelx, y, labelwidth, height);
    compo = getSwingEditorISOCode();
    add(compo);
    compo.setBounds(fieldx, y, fieldwidth, height);
    y = y + vspacing;

    label = getSwingLabelName();
    add(label);
    label.setBounds(labelx, y, labelwidth, height);
    compo = getSwingEditorName();
    add(compo);
    compo.setBounds(fieldx, y, fieldwidth, height);
    y = y + vspacing;

    label = getSwingLabelUnitSymbol();
    add(label);
    label.setBounds(labelx, y, labelwidth, height);
    compo = getSwingEditorUnitSymbol();
    add(compo);
    compo.setBounds(fieldx, y, fieldwidth, height);
    y = y + vspacing;

    label = getSwingLabelFracSymbol();
    add(label);
    label.setBounds(labelx, y, labelwidth, height);
    compo = getSwingEditorFracSymbol();
    add(compo);
    compo.setBounds(fieldx, y, fieldwidth, height);
    y = y + vspacing;

    label = getSwingLabelPrecis();
    add(label);
    label.setBounds(labelx, y, labelwidth, height);
    compo = getSwingEditorPrecis();
    add(compo);
    compo.setBounds(fieldx, y, fieldwidth, height);
    y = y + vspacing;

    // Now we can set the proper size based on the fields and references populated
    setSize(panelwidth, y);
    Dimension pfsz = new Dimension(panelwidth, y);
    setPreferredSize(pfsz);
    Dimension min = new Dimension(400, y);
    setMinimumSize(min);
    populateFields();
    adjustComponentEnableStates();
    swingIsInitializing = false;
}

From source file:net.sourceforge.msscodefactory.cfsecurity.v2_0.CFSecuritySwing.CFSecuritySwingISOLanguageAttrJPanel.java

public CFSecuritySwingISOLanguageAttrJPanel(ICFSecuritySwingSchema argSchema,
        ICFSecurityISOLanguageObj argFocus) {
    super();/*from w w w . ja v  a2  s .  com*/
    JLabel label;
    JComponent compo;
    CFJReferenceEditor reference;
    final String S_ProcName = "construct-schema-focus";
    if (argSchema == null) {
        throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), S_ProcName, 1,
                "argSchema");
    }
    // argFocus is optional; focus may be set later during execution as
    // conditions of the runtime change.
    swingSchema = argSchema;
    setSwingFocusAsISOLanguage(argFocus);
    final int spacing = 5;
    int y = spacing;
    final int height = 25;
    final int textheight = 80;
    final int vspacing = height + spacing;
    final int textvspacing = textheight + spacing;
    final int labelx = spacing;
    final int labelwidth = 200;
    final int fieldx = labelx + labelwidth + spacing;
    final int fieldwidth = 785;
    final int panelwidth = fieldx + fieldwidth + spacing;
    // temporary -- I think you have to have a panel bigger than the coordinates initially
    setSize(panelwidth, 100000);

    label = getSwingLabelId();
    add(label);
    label.setBounds(labelx, y, labelwidth, height);
    compo = getSwingEditorId();
    add(compo);
    compo.setBounds(fieldx, y, fieldwidth, height);
    y = y + vspacing;

    label = getSwingLabelISOCode();
    add(label);
    label.setBounds(labelx, y, labelwidth, height);
    compo = getSwingEditorISOCode();
    add(compo);
    compo.setBounds(fieldx, y, fieldwidth, height);
    y = y + vspacing;

    label = getSwingLabelBaseLanguageCode();
    add(label);
    label.setBounds(labelx, y, labelwidth, height);
    compo = getSwingEditorBaseLanguageCode();
    add(compo);
    compo.setBounds(fieldx, y, fieldwidth, height);
    y = y + vspacing;

    label = getSwingLabelISOCountryId();
    add(label);
    label.setBounds(labelx, y, labelwidth, height);
    compo = getSwingEditorISOCountryId();
    add(compo);
    compo.setBounds(fieldx, y, fieldwidth, height);
    y = y + vspacing;

    // Now we can set the proper size based on the fields and references populated
    setSize(panelwidth, y);
    Dimension pfsz = new Dimension(panelwidth, y);
    setPreferredSize(pfsz);
    Dimension min = new Dimension(400, y);
    setMinimumSize(min);
    populateFields();
    adjustComponentEnableStates();
    swingIsInitializing = false;
}

From source file:net.sourceforge.msscodefactory.cfsecurity.v2_0.CFSecuritySwing.CFSecuritySwingISOTimezoneAttrJPanel.java

public CFSecuritySwingISOTimezoneAttrJPanel(ICFSecuritySwingSchema argSchema,
        ICFSecurityISOTimezoneObj argFocus) {
    super();//from  w ww. j a  v a  2  s  .c  o  m
    JLabel label;
    JComponent compo;
    CFJReferenceEditor reference;
    final String S_ProcName = "construct-schema-focus";
    if (argSchema == null) {
        throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), S_ProcName, 1,
                "argSchema");
    }
    // argFocus is optional; focus may be set later during execution as
    // conditions of the runtime change.
    swingSchema = argSchema;
    setSwingFocusAsISOTimezone(argFocus);
    final int spacing = 5;
    int y = spacing;
    final int height = 25;
    final int textheight = 80;
    final int vspacing = height + spacing;
    final int textvspacing = textheight + spacing;
    final int labelx = spacing;
    final int labelwidth = 200;
    final int fieldx = labelx + labelwidth + spacing;
    final int fieldwidth = 785;
    final int panelwidth = fieldx + fieldwidth + spacing;
    // temporary -- I think you have to have a panel bigger than the coordinates initially
    setSize(panelwidth, 100000);

    label = getSwingLabelISOTimezoneId();
    add(label);
    label.setBounds(labelx, y, labelwidth, height);
    compo = getSwingEditorISOTimezoneId();
    add(compo);
    compo.setBounds(fieldx, y, fieldwidth, height);
    y = y + vspacing;

    label = getSwingLabelIso8601();
    add(label);
    label.setBounds(labelx, y, labelwidth, height);
    compo = getSwingEditorIso8601();
    add(compo);
    compo.setBounds(fieldx, y, fieldwidth, height);
    y = y + vspacing;

    label = getSwingLabelTZName();
    add(label);
    label.setBounds(labelx, y, labelwidth, height);
    compo = getSwingEditorTZName();
    add(compo);
    compo.setBounds(fieldx, y, fieldwidth, height);
    y = y + vspacing;

    label = getSwingLabelTZHourOffset();
    add(label);
    label.setBounds(labelx, y, labelwidth, height);
    compo = getSwingEditorTZHourOffset();
    add(compo);
    compo.setBounds(fieldx, y, fieldwidth, height);
    y = y + vspacing;

    label = getSwingLabelTZMinOffset();
    add(label);
    label.setBounds(labelx, y, labelwidth, height);
    compo = getSwingEditorTZMinOffset();
    add(compo);
    compo.setBounds(fieldx, y, fieldwidth, height);
    y = y + vspacing;

    label = getSwingLabelDescription();
    add(label);
    label.setBounds(labelx, y, labelwidth, height);
    compo = getSwingEditorDescription();
    add(compo);
    compo.setBounds(fieldx, y, fieldwidth, height);
    y = y + vspacing;

    label = getSwingLabelVisible();
    add(label);
    label.setBounds(labelx, y, labelwidth, height);
    compo = getSwingEditorVisible();
    add(compo);
    compo.setBounds(fieldx, y, fieldwidth, height);
    y = y + vspacing;

    // Now we can set the proper size based on the fields and references populated
    setSize(panelwidth, y);
    Dimension pfsz = new Dimension(panelwidth, y);
    setPreferredSize(pfsz);
    Dimension min = new Dimension(400, y);
    setMinimumSize(min);
    populateFields();
    adjustComponentEnableStates();
    swingIsInitializing = false;
}

From source file:net.sourceforge.msscodefactory.cfsecurity.v2_0.CFSecuritySwing.CFSecuritySwingSecAppAttrJPanel.java

public CFSecuritySwingSecAppAttrJPanel(ICFSecuritySwingSchema argSchema, ICFSecuritySecAppObj argFocus) {
    super();//  w  w w.j  a va 2s.c  o  m
    JLabel label;
    JComponent compo;
    CFJReferenceEditor reference;
    final String S_ProcName = "construct-schema-focus";
    if (argSchema == null) {
        throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), S_ProcName, 1,
                "argSchema");
    }
    // argFocus is optional; focus may be set later during execution as
    // conditions of the runtime change.
    swingSchema = argSchema;
    setSwingFocusAsSecApp(argFocus);
    final int spacing = 5;
    int y = spacing;
    final int height = 25;
    final int textheight = 80;
    final int vspacing = height + spacing;
    final int textvspacing = textheight + spacing;
    final int labelx = spacing;
    final int labelwidth = 200;
    final int fieldx = labelx + labelwidth + spacing;
    final int fieldwidth = 785;
    final int panelwidth = fieldx + fieldwidth + spacing;
    // temporary -- I think you have to have a panel bigger than the coordinates initially
    setSize(panelwidth, 100000);

    label = getSwingLabelContainerCluster();
    add(label);
    label.setBounds(labelx, y, labelwidth, height);
    reference = getSwingReferenceContainerCluster();
    add(reference);
    reference.setBounds(fieldx, y, fieldwidth, height);
    y = y + vspacing;

    label = getSwingLabelSecAppId();
    add(label);
    label.setBounds(labelx, y, labelwidth, height);
    compo = getSwingEditorSecAppId();
    add(compo);
    compo.setBounds(fieldx, y, fieldwidth, height);
    y = y + vspacing;

    label = getSwingLabelJEEMountName();
    add(label);
    label.setBounds(labelx, y, labelwidth, height);
    compo = getSwingEditorJEEMountName();
    add(compo);
    compo.setBounds(fieldx, y, fieldwidth, height);
    y = y + vspacing;

    // Now we can set the proper size based on the fields and references populated
    setSize(panelwidth, y);
    Dimension pfsz = new Dimension(panelwidth, y);
    setPreferredSize(pfsz);
    Dimension min = new Dimension(400, y);
    setMinimumSize(min);
    populateFields();
    adjustComponentEnableStates();
    swingIsInitializing = false;
}

From source file:net.sourceforge.msscodefactory.cfsecurity.v2_0.CFSecuritySwing.CFSecuritySwingSecFormAttrJPanel.java

public CFSecuritySwingSecFormAttrJPanel(ICFSecuritySwingSchema argSchema, ICFSecuritySecFormObj argFocus) {
    super();//from w w w.  j a v  a 2s  . c  om
    JLabel label;
    JComponent compo;
    CFJReferenceEditor reference;
    final String S_ProcName = "construct-schema-focus";
    if (argSchema == null) {
        throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), S_ProcName, 1,
                "argSchema");
    }
    // argFocus is optional; focus may be set later during execution as
    // conditions of the runtime change.
    swingSchema = argSchema;
    setSwingFocusAsSecForm(argFocus);
    final int spacing = 5;
    int y = spacing;
    final int height = 25;
    final int textheight = 80;
    final int vspacing = height + spacing;
    final int textvspacing = textheight + spacing;
    final int labelx = spacing;
    final int labelwidth = 200;
    final int fieldx = labelx + labelwidth + spacing;
    final int fieldwidth = 785;
    final int panelwidth = fieldx + fieldwidth + spacing;
    // temporary -- I think you have to have a panel bigger than the coordinates initially
    setSize(panelwidth, 100000);

    label = getSwingLabelOwnerCluster();
    add(label);
    label.setBounds(labelx, y, labelwidth, height);
    reference = getSwingReferenceOwnerCluster();
    add(reference);
    reference.setBounds(fieldx, y, fieldwidth, height);
    y = y + vspacing;

    label = getSwingLabelContainerApplication();
    add(label);
    label.setBounds(labelx, y, labelwidth, height);
    reference = getSwingReferenceContainerApplication();
    add(reference);
    reference.setBounds(fieldx, y, fieldwidth, height);
    y = y + vspacing;

    label = getSwingLabelSecFormId();
    add(label);
    label.setBounds(labelx, y, labelwidth, height);
    compo = getSwingEditorSecFormId();
    add(compo);
    compo.setBounds(fieldx, y, fieldwidth, height);
    y = y + vspacing;

    label = getSwingLabelJEEServletMapName();
    add(label);
    label.setBounds(labelx, y, labelwidth, height);
    compo = getSwingEditorJEEServletMapName();
    add(compo);
    compo.setBounds(fieldx, y, fieldwidth, height);
    y = y + vspacing;

    // Now we can set the proper size based on the fields and references populated
    setSize(panelwidth, y);
    Dimension pfsz = new Dimension(panelwidth, y);
    setPreferredSize(pfsz);
    Dimension min = new Dimension(400, y);
    setMinimumSize(min);
    populateFields();
    adjustComponentEnableStates();
    swingIsInitializing = false;
}

From source file:net.sourceforge.msscodefactory.cfsecurity.v2_0.CFSecuritySwing.CFSecuritySwingSecGroupAttrJPanel.java

public CFSecuritySwingSecGroupAttrJPanel(ICFSecuritySwingSchema argSchema, ICFSecuritySecGroupObj argFocus) {
    super();//w w w .  jav  a 2  s .co m
    JLabel label;
    JComponent compo;
    CFJReferenceEditor reference;
    final String S_ProcName = "construct-schema-focus";
    if (argSchema == null) {
        throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), S_ProcName, 1,
                "argSchema");
    }
    // argFocus is optional; focus may be set later during execution as
    // conditions of the runtime change.
    swingSchema = argSchema;
    setSwingFocusAsSecGroup(argFocus);
    final int spacing = 5;
    int y = spacing;
    final int height = 25;
    final int textheight = 80;
    final int vspacing = height + spacing;
    final int textvspacing = textheight + spacing;
    final int labelx = spacing;
    final int labelwidth = 200;
    final int fieldx = labelx + labelwidth + spacing;
    final int fieldwidth = 785;
    final int panelwidth = fieldx + fieldwidth + spacing;
    // temporary -- I think you have to have a panel bigger than the coordinates initially
    setSize(panelwidth, 100000);

    label = getSwingLabelContainerCluster();
    add(label);
    label.setBounds(labelx, y, labelwidth, height);
    reference = getSwingReferenceContainerCluster();
    add(reference);
    reference.setBounds(fieldx, y, fieldwidth, height);
    y = y + vspacing;

    label = getSwingLabelSecGroupId();
    add(label);
    label.setBounds(labelx, y, labelwidth, height);
    compo = getSwingEditorSecGroupId();
    add(compo);
    compo.setBounds(fieldx, y, fieldwidth, height);
    y = y + vspacing;

    label = getSwingLabelName();
    add(label);
    label.setBounds(labelx, y, labelwidth, height);
    compo = getSwingEditorName();
    add(compo);
    compo.setBounds(fieldx, y, fieldwidth, height);
    y = y + vspacing;

    // Now we can set the proper size based on the fields and references populated
    setSize(panelwidth, y);
    Dimension pfsz = new Dimension(panelwidth, y);
    setPreferredSize(pfsz);
    Dimension min = new Dimension(400, y);
    setMinimumSize(min);
    populateFields();
    adjustComponentEnableStates();
    swingIsInitializing = false;
}

From source file:net.sourceforge.msscodefactory.cfsecurity.v2_0.CFSecuritySwing.CFSecuritySwingSecGroupFormAttrJPanel.java

public CFSecuritySwingSecGroupFormAttrJPanel(ICFSecuritySwingSchema argSchema,
        ICFSecuritySecGroupFormObj argFocus) {
    super();// w  w w .  j av a  2s  .co m
    JLabel label;
    JComponent compo;
    CFJReferenceEditor reference;
    final String S_ProcName = "construct-schema-focus";
    if (argSchema == null) {
        throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), S_ProcName, 1,
                "argSchema");
    }
    // argFocus is optional; focus may be set later during execution as
    // conditions of the runtime change.
    swingSchema = argSchema;
    setSwingFocusAsSecGroupForm(argFocus);
    final int spacing = 5;
    int y = spacing;
    final int height = 25;
    final int textheight = 80;
    final int vspacing = height + spacing;
    final int textvspacing = textheight + spacing;
    final int labelx = spacing;
    final int labelwidth = 200;
    final int fieldx = labelx + labelwidth + spacing;
    final int fieldwidth = 785;
    final int panelwidth = fieldx + fieldwidth + spacing;
    // temporary -- I think you have to have a panel bigger than the coordinates initially
    setSize(panelwidth, 100000);

    label = getSwingLabelOwnerCluster();
    add(label);
    label.setBounds(labelx, y, labelwidth, height);
    reference = getSwingReferenceOwnerCluster();
    add(reference);
    reference.setBounds(fieldx, y, fieldwidth, height);
    y = y + vspacing;

    label = getSwingLabelContainerGroup();
    add(label);
    label.setBounds(labelx, y, labelwidth, height);
    reference = getSwingReferenceContainerGroup();
    add(reference);
    reference.setBounds(fieldx, y, fieldwidth, height);
    y = y + vspacing;

    label = getSwingLabelParentApp();
    add(label);
    label.setBounds(labelx, y, labelwidth, height);
    reference = getSwingReferenceParentApp();
    add(reference);
    reference.setBounds(fieldx, y, fieldwidth, height);
    y = y + vspacing;

    label = getSwingLabelParentForm();
    add(label);
    label.setBounds(labelx, y, labelwidth, height);
    reference = getSwingReferenceParentForm();
    add(reference);
    reference.setBounds(fieldx, y, fieldwidth, height);
    y = y + vspacing;

    label = getSwingLabelSecGroupFormId();
    add(label);
    label.setBounds(labelx, y, labelwidth, height);
    compo = getSwingEditorSecGroupFormId();
    add(compo);
    compo.setBounds(fieldx, y, fieldwidth, height);
    y = y + vspacing;

    // Now we can set the proper size based on the fields and references populated
    setSize(panelwidth, y);
    Dimension pfsz = new Dimension(panelwidth, y);
    setPreferredSize(pfsz);
    Dimension min = new Dimension(400, y);
    setMinimumSize(min);
    populateFields();
    adjustComponentEnableStates();
    swingIsInitializing = false;
}

From source file:net.sourceforge.msscodefactory.cfsecurity.v2_0.CFSecuritySwing.CFSecuritySwingSecGroupIncludeAttrJPanel.java

public CFSecuritySwingSecGroupIncludeAttrJPanel(ICFSecuritySwingSchema argSchema,
        ICFSecuritySecGroupIncludeObj argFocus) {
    super();//from  w w w  .j ava  2 s. c  o m
    JLabel label;
    JComponent compo;
    CFJReferenceEditor reference;
    final String S_ProcName = "construct-schema-focus";
    if (argSchema == null) {
        throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), S_ProcName, 1,
                "argSchema");
    }
    // argFocus is optional; focus may be set later during execution as
    // conditions of the runtime change.
    swingSchema = argSchema;
    setSwingFocusAsSecGroupInclude(argFocus);
    final int spacing = 5;
    int y = spacing;
    final int height = 25;
    final int textheight = 80;
    final int vspacing = height + spacing;
    final int textvspacing = textheight + spacing;
    final int labelx = spacing;
    final int labelwidth = 200;
    final int fieldx = labelx + labelwidth + spacing;
    final int fieldwidth = 785;
    final int panelwidth = fieldx + fieldwidth + spacing;
    // temporary -- I think you have to have a panel bigger than the coordinates initially
    setSize(panelwidth, 100000);

    label = getSwingLabelOwnerCluster();
    add(label);
    label.setBounds(labelx, y, labelwidth, height);
    reference = getSwingReferenceOwnerCluster();
    add(reference);
    reference.setBounds(fieldx, y, fieldwidth, height);
    y = y + vspacing;

    label = getSwingLabelContainerGroup();
    add(label);
    label.setBounds(labelx, y, labelwidth, height);
    reference = getSwingReferenceContainerGroup();
    add(reference);
    reference.setBounds(fieldx, y, fieldwidth, height);
    y = y + vspacing;

    label = getSwingLabelParentSubGroup();
    add(label);
    label.setBounds(labelx, y, labelwidth, height);
    reference = getSwingReferenceParentSubGroup();
    add(reference);
    reference.setBounds(fieldx, y, fieldwidth, height);
    y = y + vspacing;

    label = getSwingLabelSecGroupIncludeId();
    add(label);
    label.setBounds(labelx, y, labelwidth, height);
    compo = getSwingEditorSecGroupIncludeId();
    add(compo);
    compo.setBounds(fieldx, y, fieldwidth, height);
    y = y + vspacing;

    // Now we can set the proper size based on the fields and references populated
    setSize(panelwidth, y);
    Dimension pfsz = new Dimension(panelwidth, y);
    setPreferredSize(pfsz);
    Dimension min = new Dimension(400, y);
    setMinimumSize(min);
    populateFields();
    adjustComponentEnableStates();
    swingIsInitializing = false;
}