data.horizontalSpan = 1; data.verticalSpan = 20; mainComposite.setLayoutData( data ); GridLayout layout = new GridLayout(  );
data.horizontalSpan = 2; data.verticalSpan = 5;  GridLayout layout = new GridLayout();
	protected Control createContents( Composite parent )	{		Composite mainComposite = new Composite( parent, SWT.NONE );		GridData data = new GridData( GridData.CENTER);		data.horizontalSpan = 1;		data.verticalSpan = 20;		mainComposite.setLayoutData( data );		GridLayout layout = new GridLayout(  );		mainComposite.setLayout( layout );		//Set up the maximum number of schemas to be fetched in SQLDataSetPage.		maxDisplaySchemaEditor = new IntegerFieldEditor( USER_MAX_NUM_OF_SCHEMA, "", mainComposite ); 				Label lab = maxDisplaySchemaEditor.getLabelControl( mainComposite );        lab.setText(Messages.getString( "designer.preview.preference.resultset.maxNoOfSchema.description" ));				maxDisplaySchemaEditor.setPreferencePage(this);		maxDisplaySchemaEditor.setTextLimit( Integer.toString( MAX_MAX_ROW ).length( ) );				maxDisplaySchemaEditor.setValidateStrategy( StringFieldEditor.VALIDATE_ON_KEY_STROKE );		maxDisplaySchemaEditor.setValidRange(0, MAX_MAX_ROW);				maxDisplaySchemaEditor.setPropertyChangeListener(new IPropertyChangeListener() {            public void propertyChange(PropertyChangeEvent event) {                if (event.getProperty().equals(FieldEditor.IS_VALID))                        setValid(maxDisplaySchemaEditor.isValid());            }        });				maxDisplaySchemaEditor.setErrorMessage( Messages.getFormattedString( "designer.preview.preference.resultset.maxNoOfSchema.errormessage",				new Object[]{new Integer( MAX_MAX_ROW )	} ) );				String defaultMaxSchema = ReportPlugin.getDefault( )				.getPluginPreferences( )				.getString( USER_MAX_NUM_OF_SCHEMA );		if ( defaultMaxSchema == null || defaultMaxSchema.trim( ).length( ) <= 0 )		{			defaultMaxSchema = String.valueOf( DEFAULT_MAX_NUM_OF_SCHEMA );		}		maxDisplaySchemaEditor.setStringValue( defaultMaxSchema );				//Set up the maximum number of rows to be previewed in ResultSetPreviewPage.		maxRowEditor = new IntegerFieldEditor( USER_MAXROW, "", mainComposite ); 				Label lab2 = maxRowEditor.getLabelControl( mainComposite );        lab2.setText(Messages.getString( "designer.preview.preference.resultset.maxrow.description" ));				maxRowEditor.setPreferencePage(this);		maxRowEditor.setTextLimit( Integer.toString( MAX_MAX_ROW ).length( ) );		maxRowEditor.setErrorMessage( Messages.getFormattedString( "designer.preview.preference.resultset.maxrow.errormessage",				new Object[]{new Integer( MAX_MAX_ROW )	} ) );        maxRowEditor.setValidateStrategy( StringFieldEditor.VALIDATE_ON_KEY_STROKE );        maxRowEditor.setValidRange(1, MAX_MAX_ROW);        maxRowEditor.setPropertyChangeListener(new IPropertyChangeListener() {            public void propertyChange(PropertyChangeEvent event) {                if (event.getProperty().equals(FieldEditor.IS_VALID))                        setValid(maxRowEditor.isValid());            }        });        		String defaultMaxRow = ReportPlugin.getDefault( )				.getPluginPreferences( )				.getString( USER_MAXROW );		if ( defaultMaxRow == null || defaultMaxRow.trim( ).length( ) <= 0 )		{			defaultMaxRow = String.valueOf( DEFAULT_MAX_ROW );		}		maxRowEditor.setStringValue( defaultMaxRow );		return mainComposite;	}