List of usage examples for javax.swing JLabel setBounds
public void setBounds(int x, int y, int width, int height)
From source file:net.sourceforge.msscodefactory.cfasterisk.v2_4.CFAsteriskSwing.CFAsteriskSwingSecGroupFormAttrJPanel.java
public CFAsteriskSwingSecGroupFormAttrJPanel(ICFAsteriskSwingSchema argSchema, ICFSecuritySecGroupFormObj argFocus) { super();// ww w.j av a2 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; 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.cfacc.v2_0.CFAccSwing.CFAccSwingSecGroupFormAttrJPanel.java
public CFAccSwingSecGroupFormAttrJPanel(ICFAccSwingSchema argSchema, ICFAccSecGroupFormObj argFocus) { super();/* w w w .j ava2 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; 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.cfasterisk.v2_0.CFAstSwing.CFAstSwingSecGroupFormAttrJPanel.java
public CFAstSwingSecGroupFormAttrJPanel(ICFAstSwingSchema argSchema, ICFAstSecGroupFormObj argFocus) { super();//from ww w . ja v 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; 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.cfgcash.v2_0.CFGCashSwing.CFGCashSwingSecGroupFormAttrJPanel.java
public CFGCashSwingSecGroupFormAttrJPanel(ICFGCashSwingSchema argSchema, ICFGCashSecGroupFormObj argFocus) { super();/* w ww . j a 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; 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.cfensyntax.v2_1.CFEnSyntaxSwing.CFEnSyntaxSwingSecGroupFormAttrJPanel.java
public CFEnSyntaxSwingSecGroupFormAttrJPanel(ICFEnSyntaxSwingSchema argSchema, ICFEnSyntaxSecGroupFormObj argFocus) { super();//ww w. j a v a2 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; 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.cfacc.v2_0.CFAccSwing.CFAccSwingAccountAttrJPanel.java
public CFAccSwingAccountAttrJPanel(ICFAccSwingSchema argSchema, ICFAccAccountObj argFocus) { super();/*ww w . java2s.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; setSwingFocusAsAccount(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 = getSwingLabelContainerTenant(); add(label); label.setBounds(labelx, y, labelwidth, height); reference = getSwingReferenceContainerTenant(); add(reference); reference.setBounds(fieldx, y, fieldwidth, height); y = y + vspacing; label = getSwingLabelParentRollupAcct(); add(label); label.setBounds(labelx, y, labelwidth, height); reference = getSwingReferenceParentRollupAcct(); add(reference); reference.setBounds(fieldx, y, fieldwidth, height); y = y + vspacing; label = getSwingLabelLookupCcy(); add(label); label.setBounds(labelx, y, labelwidth, height); reference = getSwingReferenceLookupCcy(); add(reference); reference.setBounds(fieldx, y, fieldwidth, height); y = y + vspacing; label = getSwingLabelId(); add(label); label.setBounds(labelx, y, labelwidth, height); compo = getSwingEditorId(); add(compo); compo.setBounds(fieldx, y, fieldwidth, height); y = y + vspacing; label = getSwingLabelAccountCode(); add(label); label.setBounds(labelx, y, labelwidth, height); compo = getSwingEditorAccountCode(); 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 = getSwingLabelBalance(); add(label); label.setBounds(labelx, y, labelwidth, height); compo = getSwingEditorBalance(); 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.CFAccSwingAccountConfigAttrJPanel.java
public CFAccSwingAccountConfigAttrJPanel(ICFAccSwingSchema argSchema, ICFAccAccountConfigObj argFocus) { super();/*from www. jav 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; setSwingFocusAsAccountConfig(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 = getSwingLabelContainerTenant(); add(label); label.setBounds(labelx, y, labelwidth, height); reference = getSwingReferenceContainerTenant(); add(reference); reference.setBounds(fieldx, y, fieldwidth, height); y = y + vspacing; label = getSwingLabelLookupDefCcy(); add(label); label.setBounds(labelx, y, labelwidth, height); reference = getSwingReferenceLookupDefCcy(); add(reference); reference.setBounds(fieldx, y, fieldwidth, height); y = y + vspacing; label = getSwingLabelLookupCustCtcLst(); add(label); label.setBounds(labelx, y, labelwidth, height); reference = getSwingReferenceLookupCustCtcLst(); add(reference); reference.setBounds(fieldx, y, fieldwidth, height); y = y + vspacing; label = getSwingLabelLookupEmpCtcLst(); add(label); label.setBounds(labelx, y, labelwidth, height); reference = getSwingReferenceLookupEmpCtcLst(); add(reference); reference.setBounds(fieldx, y, fieldwidth, height); y = y + vspacing; label = getSwingLabelLookupVendCtcLst(); add(label); label.setBounds(labelx, y, labelwidth, height); reference = getSwingReferenceLookupVendCtcLst(); 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.cffreeswitch.v2_4.CFFreeSwitchSwing.CFFreeSwitchSwingPbxIvrMenuAttrJPanel.java
public CFFreeSwitchSwingPbxIvrMenuAttrJPanel(ICFFreeSwitchSwingSchema argSchema, ICFFreeSwitchPbxIvrMenuObj argFocus) { super();//w w w.ja 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; setSwingFocusAsPbxIvrMenu(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 = getSwingLabelContainerTenant(); add(label); label.setBounds(labelx, y, labelwidth, height); reference = getSwingReferenceContainerTenant(); add(reference); reference.setBounds(fieldx, y, fieldwidth, height); y = y + vspacing; label = getSwingLabelMenuId(); add(label); label.setBounds(labelx, y, labelwidth, height); compo = getSwingEditorMenuId(); 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 = getSwingLabelGreetLong(); add(label); label.setBounds(labelx, y, labelwidth, height); compo = getSwingEditorGreetLong(); add(compo); compo.setBounds(fieldx, y, fieldwidth, height); y = y + vspacing; label = getSwingLabelGreetShort(); add(label); label.setBounds(labelx, y, labelwidth, height); compo = getSwingEditorGreetShort(); add(compo); compo.setBounds(fieldx, y, fieldwidth, height); y = y + vspacing; label = getSwingLabelInvalidSound(); add(label); label.setBounds(labelx, y, labelwidth, height); compo = getSwingEditorInvalidSound(); add(compo); compo.setBounds(fieldx, y, fieldwidth, height); y = y + vspacing; label = getSwingLabelExitSound(); add(label); label.setBounds(labelx, y, labelwidth, height); compo = getSwingEditorExitSound(); add(compo); compo.setBounds(fieldx, y, fieldwidth, height); y = y + vspacing; label = getSwingLabelTimeout(); add(label); label.setBounds(labelx, y, labelwidth, height); compo = getSwingEditorTimeout(); add(compo); compo.setBounds(fieldx, y, fieldwidth, height); y = y + vspacing; label = getSwingLabelInterDigitTimeout(); add(label); label.setBounds(labelx, y, labelwidth, height); compo = getSwingEditorInterDigitTimeout(); add(compo); compo.setBounds(fieldx, y, fieldwidth, height); y = y + vspacing; label = getSwingLabelMaxFailures(); add(label); label.setBounds(labelx, y, labelwidth, height); compo = getSwingEditorMaxFailures(); add(compo); compo.setBounds(fieldx, y, fieldwidth, height); y = y + vspacing; label = getSwingLabelMaxTimeouts(); add(label); label.setBounds(labelx, y, labelwidth, height); compo = getSwingEditorMaxTimeouts(); add(compo); compo.setBounds(fieldx, y, fieldwidth, height); y = y + vspacing; label = getSwingLabelDigitLen(); add(label); label.setBounds(labelx, y, labelwidth, height); compo = getSwingEditorDigitLen(); 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.CFAccSwingAddressAttrJPanel.java
public CFAccSwingAddressAttrJPanel(ICFAccSwingSchema argSchema, ICFAccAddressObj argFocus) { super();/*from w w w . ja v a 2 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; setSwingFocusAsAddress(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 = getSwingLabelLookupCountry(); add(label); label.setBounds(labelx, y, labelwidth, height); reference = getSwingReferenceLookupCountry(); add(reference); reference.setBounds(fieldx, y, fieldwidth, height); y = y + vspacing; label = getSwingLabelAddressId(); add(label); label.setBounds(labelx, y, labelwidth, height); compo = getSwingEditorAddressId(); 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 = getSwingLabelAddrLine1(); add(label); label.setBounds(labelx, y, labelwidth, height); compo = getSwingEditorAddrLine1(); add(compo); compo.setBounds(fieldx, y, fieldwidth, height); y = y + vspacing; label = getSwingLabelAddrLine2(); add(label); label.setBounds(labelx, y, labelwidth, height); compo = getSwingEditorAddrLine2(); add(compo); compo.setBounds(fieldx, y, fieldwidth, height); y = y + vspacing; label = getSwingLabelCity(); add(label); label.setBounds(labelx, y, labelwidth, height); compo = getSwingEditorCity(); add(compo); compo.setBounds(fieldx, y, fieldwidth, height); y = y + vspacing; label = getSwingLabelState(); add(label); label.setBounds(labelx, y, labelwidth, height); compo = getSwingEditorState(); add(compo); compo.setBounds(fieldx, y, fieldwidth, height); y = y + vspacing; label = getSwingLabelZip(); add(label); label.setBounds(labelx, y, labelwidth, height); compo = getSwingEditorZip(); 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.CFAccSwingContactAttrJPanel.java
public CFAccSwingContactAttrJPanel(ICFAccSwingSchema argSchema, ICFAccContactObj argFocus) { super();/*from w w w . j a v a 2s. 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; setSwingFocusAsContact(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 = getSwingLabelContainerContactList(); add(label); label.setBounds(labelx, y, labelwidth, height); reference = getSwingReferenceContainerContactList(); add(reference); reference.setBounds(fieldx, y, fieldwidth, height); y = y + vspacing; label = getSwingLabelLookupContactTimezone(); add(label); label.setBounds(labelx, y, labelwidth, height); reference = getSwingReferenceLookupContactTimezone(); add(reference); reference.setBounds(fieldx, y, fieldwidth, height); y = y + vspacing; label = getSwingLabelContactId(); add(label); label.setBounds(labelx, y, labelwidth, height); compo = getSwingEditorContactId(); add(compo); compo.setBounds(fieldx, y, fieldwidth, height); y = y + vspacing; label = getSwingLabelFullName(); add(label); label.setBounds(labelx, y, labelwidth, height); compo = getSwingEditorFullName(); add(compo); compo.setBounds(fieldx, y, fieldwidth, height); y = y + vspacing; label = getSwingLabelLastName(); add(label); label.setBounds(labelx, y, labelwidth, height); compo = getSwingEditorLastName(); add(compo); compo.setBounds(fieldx, y, fieldwidth, height); y = y + vspacing; label = getSwingLabelFirstName(); add(label); label.setBounds(labelx, y, labelwidth, height); compo = getSwingEditorFirstName(); add(compo); compo.setBounds(fieldx, y, fieldwidth, height); y = y + vspacing; label = getSwingLabelCustom(); add(label); label.setBounds(labelx, y, labelwidth, height); compo = getSwingEditorCustom(); add(compo); compo.setBounds(fieldx, y, fieldwidth, height); y = y + vspacing; label = getSwingLabelCustom2(); add(label); label.setBounds(labelx, y, labelwidth, height); compo = getSwingEditorCustom2(); add(compo); compo.setBounds(fieldx, y, fieldwidth, height); y = y + vspacing; label = getSwingLabelCustom3(); add(label); label.setBounds(labelx, y, labelwidth, height); compo = getSwingEditorCustom3(); 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; }