List of usage examples for javax.swing JComponent setBounds
public void setBounds(int x, int y, int width, int height)
From source file:net.sourceforge.msscodefactory.cfacc.v2_0.CFAccSwing.CFAccSwingSecGroupFormAttrJPanel.java
public void doLayout() { JLabel label;/*from w w w . jav a2 s.co m*/ JComponent compo; CFJReferenceEditor reference; Dimension dim; 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 = 1024; Dimension jpsz = getSize(); int usefieldwidth = jpsz.width - 215; label = getSwingLabelOwnerCluster(); label.setBounds(labelx, y, labelwidth, height); reference = getSwingReferenceOwnerCluster(); reference.setBounds(fieldx, y, usefieldwidth, height); y = y + vspacing; label = getSwingLabelContainerGroup(); label.setBounds(labelx, y, labelwidth, height); reference = getSwingReferenceContainerGroup(); reference.setBounds(fieldx, y, usefieldwidth, height); y = y + vspacing; label = getSwingLabelParentApp(); label.setBounds(labelx, y, labelwidth, height); reference = getSwingReferenceParentApp(); reference.setBounds(fieldx, y, usefieldwidth, height); y = y + vspacing; label = getSwingLabelParentForm(); label.setBounds(labelx, y, labelwidth, height); reference = getSwingReferenceParentForm(); reference.setBounds(fieldx, y, usefieldwidth, height); y = y + vspacing; label = getSwingLabelSecGroupFormId(); label.setBounds(labelx, y, labelwidth, height); compo = getSwingEditorSecGroupFormId(); dim = compo.getMaximumSize(); if (dim.width < usefieldwidth) { compo.setBounds(fieldx, y, dim.width, height); } else { compo.setBounds(fieldx, y, fieldwidth, height); } y = y + vspacing; }
From source file:net.sourceforge.msscodefactory.cfacc.v2_0.CFAccSwing.CFAccSwingAddressAttrJPanel.java
public void doLayout() { JLabel label;/*from ww w .j a v a 2 s .c o m*/ JComponent compo; CFJReferenceEditor reference; Dimension dim; 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 = 1024; Dimension jpsz = getSize(); int usefieldwidth = jpsz.width - 215; label = getSwingLabelOwnerTenant(); label.setBounds(labelx, y, labelwidth, height); reference = getSwingReferenceOwnerTenant(); reference.setBounds(fieldx, y, usefieldwidth, height); y = y + vspacing; label = getSwingLabelContainerContact(); label.setBounds(labelx, y, labelwidth, height); reference = getSwingReferenceContainerContact(); reference.setBounds(fieldx, y, usefieldwidth, height); y = y + vspacing; label = getSwingLabelLookupCountry(); label.setBounds(labelx, y, labelwidth, height); reference = getSwingReferenceLookupCountry(); reference.setBounds(fieldx, y, usefieldwidth, height); y = y + vspacing; label = getSwingLabelAddressId(); label.setBounds(labelx, y, labelwidth, height); compo = getSwingEditorAddressId(); dim = compo.getMaximumSize(); if (dim.width < usefieldwidth) { compo.setBounds(fieldx, y, dim.width, height); } else { compo.setBounds(fieldx, y, fieldwidth, height); } y = y + vspacing; label = getSwingLabelDescription(); label.setBounds(labelx, y, labelwidth, height); compo = getSwingEditorDescription(); dim = compo.getMaximumSize(); if (dim.width < usefieldwidth) { compo.setBounds(fieldx, y, dim.width, height); } else { compo.setBounds(fieldx, y, fieldwidth, height); } y = y + vspacing; label = getSwingLabelAddrLine1(); label.setBounds(labelx, y, labelwidth, height); compo = getSwingEditorAddrLine1(); dim = compo.getMaximumSize(); if (dim.width < usefieldwidth) { compo.setBounds(fieldx, y, dim.width, height); } else { compo.setBounds(fieldx, y, fieldwidth, height); } y = y + vspacing; label = getSwingLabelAddrLine2(); label.setBounds(labelx, y, labelwidth, height); compo = getSwingEditorAddrLine2(); dim = compo.getMaximumSize(); if (dim.width < usefieldwidth) { compo.setBounds(fieldx, y, dim.width, height); } else { compo.setBounds(fieldx, y, fieldwidth, height); } y = y + vspacing; label = getSwingLabelCity(); label.setBounds(labelx, y, labelwidth, height); compo = getSwingEditorCity(); dim = compo.getMaximumSize(); if (dim.width < usefieldwidth) { compo.setBounds(fieldx, y, dim.width, height); } else { compo.setBounds(fieldx, y, fieldwidth, height); } y = y + vspacing; label = getSwingLabelState(); label.setBounds(labelx, y, labelwidth, height); compo = getSwingEditorState(); dim = compo.getMaximumSize(); if (dim.width < usefieldwidth) { compo.setBounds(fieldx, y, dim.width, height); } else { compo.setBounds(fieldx, y, fieldwidth, height); } y = y + vspacing; label = getSwingLabelZip(); label.setBounds(labelx, y, labelwidth, height); compo = getSwingEditorZip(); dim = compo.getMaximumSize(); if (dim.width < usefieldwidth) { compo.setBounds(fieldx, y, dim.width, height); } else { compo.setBounds(fieldx, y, fieldwidth, height); } y = y + vspacing; }
From source file:net.sourceforge.msscodefactory.cfacc.v2_0.CFAccSwing.CFAccSwingContactAttrJPanel.java
public void doLayout() { JLabel label;// ww w . j a va 2s.co m JComponent compo; CFJReferenceEditor reference; Dimension dim; 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 = 1024; Dimension jpsz = getSize(); int usefieldwidth = jpsz.width - 215; label = getSwingLabelOwnerTenant(); label.setBounds(labelx, y, labelwidth, height); reference = getSwingReferenceOwnerTenant(); reference.setBounds(fieldx, y, usefieldwidth, height); y = y + vspacing; label = getSwingLabelContainerContactList(); label.setBounds(labelx, y, labelwidth, height); reference = getSwingReferenceContainerContactList(); reference.setBounds(fieldx, y, usefieldwidth, height); y = y + vspacing; label = getSwingLabelLookupContactTimezone(); label.setBounds(labelx, y, labelwidth, height); reference = getSwingReferenceLookupContactTimezone(); reference.setBounds(fieldx, y, usefieldwidth, height); y = y + vspacing; label = getSwingLabelContactId(); label.setBounds(labelx, y, labelwidth, height); compo = getSwingEditorContactId(); dim = compo.getMaximumSize(); if (dim.width < usefieldwidth) { compo.setBounds(fieldx, y, dim.width, height); } else { compo.setBounds(fieldx, y, fieldwidth, height); } y = y + vspacing; label = getSwingLabelFullName(); label.setBounds(labelx, y, labelwidth, height); compo = getSwingEditorFullName(); dim = compo.getMaximumSize(); if (dim.width < usefieldwidth) { compo.setBounds(fieldx, y, dim.width, height); } else { compo.setBounds(fieldx, y, fieldwidth, height); } y = y + vspacing; label = getSwingLabelLastName(); label.setBounds(labelx, y, labelwidth, height); compo = getSwingEditorLastName(); dim = compo.getMaximumSize(); if (dim.width < usefieldwidth) { compo.setBounds(fieldx, y, dim.width, height); } else { compo.setBounds(fieldx, y, fieldwidth, height); } y = y + vspacing; label = getSwingLabelFirstName(); label.setBounds(labelx, y, labelwidth, height); compo = getSwingEditorFirstName(); dim = compo.getMaximumSize(); if (dim.width < usefieldwidth) { compo.setBounds(fieldx, y, dim.width, height); } else { compo.setBounds(fieldx, y, fieldwidth, height); } y = y + vspacing; label = getSwingLabelCustom(); label.setBounds(labelx, y, labelwidth, height); compo = getSwingEditorCustom(); dim = compo.getMaximumSize(); if (dim.width < usefieldwidth) { compo.setBounds(fieldx, y, dim.width, height); } else { compo.setBounds(fieldx, y, fieldwidth, height); } y = y + vspacing; label = getSwingLabelCustom2(); label.setBounds(labelx, y, labelwidth, height); compo = getSwingEditorCustom2(); dim = compo.getMaximumSize(); if (dim.width < usefieldwidth) { compo.setBounds(fieldx, y, dim.width, height); } else { compo.setBounds(fieldx, y, fieldwidth, height); } y = y + vspacing; label = getSwingLabelCustom3(); label.setBounds(labelx, y, labelwidth, height); compo = getSwingEditorCustom3(); dim = compo.getMaximumSize(); if (dim.width < usefieldwidth) { compo.setBounds(fieldx, y, dim.width, height); } else { compo.setBounds(fieldx, y, fieldwidth, height); } y = y + vspacing; }
From source file:net.sourceforge.msscodefactory.cfcrm.v2_1.CFCrmSwing.CFCrmSwingMemoTagAttrJPanel.java
public CFCrmSwingMemoTagAttrJPanel(ICFCrmSwingSchema argSchema, ICFCrmMemoTagObj argFocus) { super();/*w w w.j av 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; setSwingFocusAsMemoTag(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 = getSwingLabelOwnerTenant(); add(label); label.setBounds(labelx, y, labelwidth, height); reference = getSwingReferenceOwnerTenant(); add(reference); reference.setBounds(fieldx, y, fieldwidth, height); y = y + vspacing; label = getSwingLabelContainerContactMemo(); add(label); label.setBounds(labelx, y, labelwidth, height); reference = getSwingReferenceContainerContactMemo(); add(reference); reference.setBounds(fieldx, y, fieldwidth, height); y = y + vspacing; label = getSwingLabelParentTag(); add(label); label.setBounds(labelx, y, labelwidth, height); reference = getSwingReferenceParentTag(); add(reference); reference.setBounds(fieldx, y, fieldwidth, height); y = y + vspacing; label = getSwingLabelTagValue(); add(label); label.setBounds(labelx, y, labelwidth, height); compo = getSwingEditorTagValue(); 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.cfacc.v2_0.CFAccSwing.CFAccSwingContactTagAttrJPanel.java
public CFAccSwingContactTagAttrJPanel(ICFAccSwingSchema argSchema, ICFAccContactTagObj argFocus) { super();/*from w ww .ja 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; setSwingFocusAsContactTag(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 = getSwingLabelOwnerTenant(); add(label); label.setBounds(labelx, y, labelwidth, height); reference = getSwingReferenceOwnerTenant(); add(reference); reference.setBounds(fieldx, y, fieldwidth, height); y = y + vspacing; label = getSwingLabelContainerContact(); add(label); label.setBounds(labelx, y, labelwidth, height); reference = getSwingReferenceContainerContact(); add(reference); reference.setBounds(fieldx, y, fieldwidth, height); y = y + vspacing; label = getSwingLabelParentTag(); add(label); label.setBounds(labelx, y, labelwidth, height); reference = getSwingReferenceParentTag(); add(reference); reference.setBounds(fieldx, y, fieldwidth, height); y = y + vspacing; label = getSwingLabelTagValue(); add(label); label.setBounds(labelx, y, labelwidth, height); compo = getSwingEditorTagValue(); 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.cfcrm.v2_0.CFCrmSwing.CFCrmSwingSecGroupMemberAttrJPanel.java
public CFCrmSwingSecGroupMemberAttrJPanel(ICFCrmSwingSchema argSchema, ICFCrmSecGroupMemberObj argFocus) { super();//from ww w . java2s . 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; setSwingFocusAsSecGroupMember(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 = getSwingLabelParentUser(); add(label); label.setBounds(labelx, y, labelwidth, height); reference = getSwingReferenceParentUser(); add(reference); reference.setBounds(fieldx, y, fieldwidth, height); y = y + vspacing; label = getSwingLabelSecGroupMemberId(); add(label); label.setBounds(labelx, y, labelwidth, height); compo = getSwingEditorSecGroupMemberId(); 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.cfacc.v2_0.CFAccSwing.CFAccSwingMemoTagAttrJPanel.java
public CFAccSwingMemoTagAttrJPanel(ICFAccSwingSchema argSchema, ICFAccMemoTagObj argFocus) { super();//from w w w.ja 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; setSwingFocusAsMemoTag(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 = getSwingLabelOwnerTenant(); add(label); label.setBounds(labelx, y, labelwidth, height); reference = getSwingReferenceOwnerTenant(); add(reference); reference.setBounds(fieldx, y, fieldwidth, height); y = y + vspacing; label = getSwingLabelContainerContactMemo(); add(label); label.setBounds(labelx, y, labelwidth, height); reference = getSwingReferenceContainerContactMemo(); add(reference); reference.setBounds(fieldx, y, fieldwidth, height); y = y + vspacing; label = getSwingLabelParentTag(); add(label); label.setBounds(labelx, y, labelwidth, height); reference = getSwingReferenceParentTag(); add(reference); reference.setBounds(fieldx, y, fieldwidth, height); y = y + vspacing; label = getSwingLabelTagValue(); add(label); label.setBounds(labelx, y, labelwidth, height); compo = getSwingEditorTagValue(); 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.cfgcash.v2_0.CFGCashSwing.CFGCashSwingMemoTagAttrJPanel.java
public CFGCashSwingMemoTagAttrJPanel(ICFGCashSwingSchema argSchema, ICFGCashMemoTagObj argFocus) { super();// w w w. ja v a 2 s.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; setSwingFocusAsMemoTag(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 = getSwingLabelOwnerTenant(); add(label); label.setBounds(labelx, y, labelwidth, height); reference = getSwingReferenceOwnerTenant(); add(reference); reference.setBounds(fieldx, y, fieldwidth, height); y = y + vspacing; label = getSwingLabelContainerContactMemo(); add(label); label.setBounds(labelx, y, labelwidth, height); reference = getSwingReferenceContainerContactMemo(); add(reference); reference.setBounds(fieldx, y, fieldwidth, height); y = y + vspacing; label = getSwingLabelParentTag(); add(label); label.setBounds(labelx, y, labelwidth, height); reference = getSwingReferenceParentTag(); add(reference); reference.setBounds(fieldx, y, fieldwidth, height); y = y + vspacing; label = getSwingLabelTagValue(); add(label); label.setBounds(labelx, y, labelwidth, height); compo = getSwingEditorTagValue(); 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.cfacc.v2_0.CFAccSwing.CFAccSwingPhoneTagAttrJPanel.java
public CFAccSwingPhoneTagAttrJPanel(ICFAccSwingSchema argSchema, ICFAccPhoneTagObj argFocus) { super();/*from www.ja v a 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; setSwingFocusAsPhoneTag(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 = getSwingLabelOwnerTenant(); add(label); label.setBounds(labelx, y, labelwidth, height); reference = getSwingReferenceOwnerTenant(); add(reference); reference.setBounds(fieldx, y, fieldwidth, height); y = y + vspacing; label = getSwingLabelContainerContactPhone(); add(label); label.setBounds(labelx, y, labelwidth, height); reference = getSwingReferenceContainerContactPhone(); add(reference); reference.setBounds(fieldx, y, fieldwidth, height); y = y + vspacing; label = getSwingLabelParentTag(); add(label); label.setBounds(labelx, y, labelwidth, height); reference = getSwingReferenceParentTag(); add(reference); reference.setBounds(fieldx, y, fieldwidth, height); y = y + vspacing; label = getSwingLabelTagValue(); add(label); label.setBounds(labelx, y, labelwidth, height); compo = getSwingEditorTagValue(); 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.cfinternet.v2_0.CFInternetSwing.CFInternetSwingSecGroupMemberAttrJPanel.java
public CFInternetSwingSecGroupMemberAttrJPanel(ICFInternetSwingSchema argSchema, ICFInternetSecGroupMemberObj argFocus) { super();//from w w w . j a va2 s . 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; setSwingFocusAsSecGroupMember(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 = getSwingLabelParentUser(); add(label); label.setBounds(labelx, y, labelwidth, height); reference = getSwingReferenceParentUser(); add(reference); reference.setBounds(fieldx, y, fieldwidth, height); y = y + vspacing; label = getSwingLabelSecGroupMemberId(); add(label); label.setBounds(labelx, y, labelwidth, height); compo = getSwingEditorSecGroupMemberId(); 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; }