int i;
int nCount = 0;
Object arrControls [] = null;
Component componentControl;
JMPanel panelContent;
Panel panel;
Panel panelNext;
Panel panelButtons;
this.setLayout ( new BorderLayout() );
panelContent = new JMPanel ( new BorderLayout() );
panelContent.setEmptyBorder ( 6, 6, 6, 6 );
this.add ( panelContent, BorderLayout.CENTER );
if ( dataSource != null )
arrControls = dataSource.getControls ();
if ( arrControls != null )
nCount = arrControls.length;
panel = panelContent;
nControlCount = 0;
for ( i = 0; i < nCount; i++ ) {
if ( arrControls[i] == null )
continue;
if ( !(arrControls[i] instanceof Control) )
continue;
componentControl = ((Control)arrControls[i]).getControlComponent ();
if ( componentControl == null )
continue;
nControlCount++;
panelNext = new Panel ( new BorderLayout(6,6) );
panelNext.add ( componentControl, BorderLayout.NORTH );
panel.add ( panelNext, BorderLayout.CENTER );
panel = panelNext;
}
panel = new JMPanel ( new FlowLayout(FlowLayout.CENTER) );
panelContent.add ( panel, BorderLayout.SOUTH );
panelButtons = createButtonPanel ( new String[] { ACTION_CLOSE } );
panel.add ( panelButtons );
this.pack ();
this.setResizable ( false );