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.cffreeswitch.v2_1.CFFswSwing.CFFswSwingFSSofiaAttrJPanel.java
public void doLayout() { JLabel label;/*from w w w . j av 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 = getSwingLabelContainerTenant(); label.setBounds(labelx, y, labelwidth, height); reference = getSwingReferenceContainerTenant(); reference.setBounds(fieldx, y, usefieldwidth, height); y = y + vspacing; label = getSwingLabelFSSofiaId(); label.setBounds(labelx, y, labelwidth, height); compo = getSwingEditorFSSofiaId(); 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 = getSwingLabelName(); label.setBounds(labelx, y, labelwidth, height); compo = getSwingEditorName(); 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 = getSwingLabelLogLevel(); label.setBounds(labelx, y, labelwidth, height); compo = getSwingEditorLogLevel(); 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 = getSwingLabelAutoRestart(); label.setBounds(labelx, y, labelwidth, height); compo = getSwingEditorAutoRestart(); 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 = getSwingLabelDebugPresence(); label.setBounds(labelx, y, labelwidth, height); compo = getSwingEditorDebugPresence(); 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.cfasterisk.v2_2.CFAstSwing.CFAstSwingSecUserAttrJPanel.java
public void doLayout() { JLabel label;/*from w w w . j av a 2 s .c om*/ 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 = getSwingLabelLookupDefDev(); label.setBounds(labelx, y, labelwidth, height); reference = getSwingReferenceLookupDefDev(); reference.setBounds(fieldx, y, usefieldwidth, height); y = y + vspacing; label = getSwingLabelSecUserId(); label.setBounds(labelx, y, labelwidth, height); compo = getSwingEditorSecUserId(); 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 = getSwingLabelLoginId(); label.setBounds(labelx, y, labelwidth, height); compo = getSwingEditorLoginId(); 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 = getSwingLabelEMailAddress(); label.setBounds(labelx, y, labelwidth, height); compo = getSwingEditorEMailAddress(); 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 = getSwingLabelEMailConfirmationUuid(); label.setBounds(labelx, y, labelwidth, height); compo = getSwingEditorEMailConfirmationUuid(); 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 = getSwingLabelPasswordHash(); label.setBounds(labelx, y, labelwidth, height); compo = getSwingEditorPasswordHash(); 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 = getSwingLabelPasswordResetUuid(); label.setBounds(labelx, y, labelwidth, height); compo = getSwingEditorPasswordResetUuid(); 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.cfasterisk.v2_4.CFAsteriskSwing.CFAsteriskSwingISOCurrencyAttrJPanel.java
public CFAsteriskSwingISOCurrencyAttrJPanel(ICFAsteriskSwingSchema argSchema, ICFSecurityISOCurrencyObj argFocus) { super();//from ww w. j a va 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; 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.cfacc.v2_0.CFAccSwing.CFAccSwingISOCurrencyAttrJPanel.java
public CFAccSwingISOCurrencyAttrJPanel(ICFAccSwingSchema argSchema, ICFAccISOCurrencyObj argFocus) { super();//from w w w . j a v a2s . 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; 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.cfasterisk.v2_0.CFAstSwing.CFAstSwingISOCurrencyAttrJPanel.java
public CFAstSwingISOCurrencyAttrJPanel(ICFAstSwingSchema argSchema, ICFAstISOCurrencyObj argFocus) { super();/*from w ww .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; 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.cfasterisk.v2_1.CFAstSwing.CFAstSwingSecUserAttrJPanel.java
public void doLayout() { JLabel label;// w w 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 = getSwingLabelLookupDefDev(); label.setBounds(labelx, y, labelwidth, height); reference = getSwingReferenceLookupDefDev(); reference.setBounds(fieldx, y, usefieldwidth, height); y = y + vspacing; label = getSwingLabelSecUserId(); label.setBounds(labelx, y, labelwidth, height); compo = getSwingEditorSecUserId(); 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 = getSwingLabelEMailAddress(); label.setBounds(labelx, y, labelwidth, height); compo = getSwingEditorEMailAddress(); 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 = getSwingLabelHtmlPwHexHash(); label.setBounds(labelx, y, labelwidth, height); compo = getSwingEditorHtmlPwHexHash(); 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 = getSwingLabelHtmlResetPwHexHash(); label.setBounds(labelx, y, labelwidth, height); compo = getSwingEditorHtmlResetPwHexHash(); 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 = getSwingLabelAppPwHexHash(); label.setBounds(labelx, y, labelwidth, height); compo = getSwingEditorAppPwHexHash(); 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 = getSwingLabelAppResetPwHexHash(); label.setBounds(labelx, y, labelwidth, height); compo = getSwingEditorAppResetPwHexHash(); 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 = getSwingLabelMailtoEMailAddress(); label.setBounds(labelx, y, labelwidth, height); compo = getSwingEditorMailtoEMailAddress(); 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.cfasterisk.v2_0.CFAstSwing.CFAstSwingConfigurationFileAttrJPanel.java
public void doLayout() { JLabel label;/*from w w w. ja 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 = getSwingLabelOwnerCluster(); label.setBounds(labelx, y, labelwidth, height); reference = getSwingReferenceOwnerCluster(); reference.setBounds(fieldx, y, usefieldwidth, height); y = y + vspacing; label = getSwingLabelContainerHostNode(); label.setBounds(labelx, y, labelwidth, height); reference = getSwingReferenceContainerHostNode(); reference.setBounds(fieldx, y, usefieldwidth, height); y = y + vspacing; label = getSwingLabelId(); label.setBounds(labelx, y, labelwidth, height); compo = getSwingEditorId(); 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 = getSwingLabelFileFullName(); label.setBounds(labelx, y, labelwidth, height); compo = getSwingEditorFileFullName(); 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.cfasterisk.v2_4.CFAsteriskSwing.CFAsteriskSwingISOTimezoneAttrJPanel.java
public CFAsteriskSwingISOTimezoneAttrJPanel(ICFAsteriskSwingSchema argSchema, ICFSecurityISOTimezoneObj argFocus) { super();// w w w . java 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; 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.cfacc.v2_0.CFAccSwing.CFAccSwingSecFormAttrJPanel.java
public void doLayout() { JLabel label;/*from w w w . j av a 2s.com*/ 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 = getSwingLabelContainerApplication(); label.setBounds(labelx, y, labelwidth, height); reference = getSwingReferenceContainerApplication(); reference.setBounds(fieldx, y, usefieldwidth, height); y = y + vspacing; label = getSwingLabelSecFormId(); label.setBounds(labelx, y, labelwidth, height); compo = getSwingEditorSecFormId(); 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 = getSwingLabelJEEServletMapName(); label.setBounds(labelx, y, labelwidth, height); compo = getSwingEditorJEEServletMapName(); 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.CFAccSwingISOTimezoneAttrJPanel.java
public CFAccSwingISOTimezoneAttrJPanel(ICFAccSwingSchema argSchema, ICFAccISOTimezoneObj argFocus) { super();/* www. ja va 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; }