private void createField(ResultSet rs){
  GridFieldVO voF=GridFieldVO.createParameter(Env.getCtx(),m_WindowNo,rs);
  GridField mField=new GridField(voF);
  m_mFields.add(mField);
  gbc.gridy=m_line++;
  gbc.gridwidth=1;
  gbc.fill=GridBagConstraints.HORIZONTAL;
  gbc.gridx=0;
  gbc.weightx=0;
  JLabel label=VEditorFactory.getLabel(mField);
  if (label == null) {
    gbc.insets=nullInset;
    centerPanel.add(Box.createHorizontalStrut(12),gbc);
  }
 else {
    gbc.insets=labelInset;
    centerPanel.add(label,gbc);
  }
  gbc.insets=fieldInset;
  gbc.fill=GridBagConstraints.HORIZONTAL;
  gbc.gridwidth=1;
  gbc.gridx=1;
  gbc.weightx=1;
  VEditor vEditor=VEditorFactory.getEditor(mField,false);
  vEditor.addVetoableChangeListener(this);
  mField.addPropertyChangeListener(vEditor);
  centerPanel.add((Component)vEditor,gbc);
  m_vEditors.add(vEditor);
  Object defaultObject=mField.getDefault();
  mField.setValue(defaultObject,true);
  if (voF.isRange) {
    gbc.gridx=2;
    gbc.weightx=0;
    gbc.fill=GridBagConstraints.NONE;
    JLabel dash=new JLabel(" - ");
    centerPanel.add(dash,gbc);
    m_separators.add(dash);
    gbc.gridx=3;
    gbc.insets=fieldInsetRight;
    gbc.weightx=1;
    gbc.fill=GridBagConstraints.HORIZONTAL;
    gbc.anchor=GridBagConstraints.WEST;
    GridFieldVO voF2=GridFieldVO.createParameter(voF);
    GridField mField2=new GridField(voF2);
    m_mFields2.add(mField2);
    VEditor vEditor2=VEditorFactory.getEditor(mField2,false);
    mField2.addPropertyChangeListener(vEditor2);
    centerPanel.add((Component)vEditor2,gbc);
    m_vEditors2.add(vEditor2);
    Object defaultObject2=mField2.getDefault();
    mField2.setValue(defaultObject2,true);
  }
 else {
    m_separators.add(null);
    m_mFields2.add(null);
    m_vEditors2.add(null);
  }
}

private void createField ( ResultSet rs ) { GridFieldVO voF = GridFieldVO . createParameter ( Env . getCtx ( ) , m_WindowNo , rs ) ; GridField mField = new GridField ( voF ) ; m_mFields . add ( mField ) ; gbc . gridy = m_line ++ ; gbc . gridwidth = 1 ; gbc . fill = GridBagConstraints . HORIZONTAL ; gbc . gridx = 0 ; gbc . weightx = 0 ; JLabel label = VEditorFactory . getLabel ( mField ) ; if ( label == null ) { gbc . insets = nullInset ; centerPanel . add ( Box . createHorizontalStrut ( 12 ) , gbc ) ; } else { gbc . insets = labelInset ; centerPanel . add ( label , gbc ) ; } gbc . insets = fieldInset ; gbc . fill = GridBagConstraints . HORIZONTAL ; gbc . gridwidth = 1 ; gbc . gridx = 1 ; gbc . weightx = 1 ; VEditor vEditor = VEditorFactory . getEditor ( mField , false ) ; vEditor . addVetoableChangeListener ( this ) ; mField . addPropertyChangeListener ( vEditor ) ; centerPanel . add ( ( Component ) vEditor , gbc ) ; m_vEditors . add ( vEditor ) ; Object defaultObject = mField . getDefault ( ) ; mField . setValue ( defaultObject , true ) ; if ( voF . isRange ) { gbc . gridx = 2 ; gbc . weightx = 0 ; gbc . fill = GridBagConstraints . NONE ; JLabel dash = new JLabel ( " - " ) ; centerPanel . add ( dash , gbc ) ; m_separators . add ( dash ) ; gbc . gridx = 3 ; gbc . insets = fieldInsetRight ; gbc . weightx = 1 ; gbc . fill = GridBagConstraints . HORIZONTAL ; gbc . anchor = GridBagConstraints . WEST ; GridFieldVO voF2 = GridFieldVO . createParameter ( voF ) ; GridField mField2 = new GridField ( voF2 ) ; m_mFields2 . add ( mField2 ) ; VEditor vEditor2 = VEditorFactory . getEditor ( mField2 , false ) ; mField2 . addPropertyChangeListener ( vEditor2 ) ; centerPanel . add ( ( Component ) vEditor2 , gbc ) ; m_vEditors2 . add ( vEditor2 ) ; Object defaultObject2 = mField2 . getDefault ( ) ; mField2 . setValue ( defaultObject2 , true ) ; } else { m_separators . add ( null ) ; m_mFields2 . add ( null ) ; m_vEditors2 . add ( null ) ; } }
create field . - creates fields and adds it to m_mfields list - creates editor and adds it to m_veditors list handles ranges by adding additional mfield / veditor . < p > mfields are used for default value and mandatory checking ; veditors are used to retrieve the value ( no data binding )
