Bug 13661 Labels and widgets too far apart in preference pages
Build: 20020411 Steps: 1. Click on Window->Preferences 2. Open Java->Editor or Java->Compiler The widgets used to select options (Combo boxes or color selection boxes) are right-aligned, and the labels are left aligned, leaving a large space between. This problem is magnified if the user opens a page that is wider than the default width, "stretching" the preference page dialog box. It takes more than a glance for the user to realize which labels line up with which widgets. See the Ant->Console page for an example of a better layout. In Ant->Console, the widgets are aligned, but appear closer to their labels.
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/CompilerPreferencePage.java
addComboBox(complianceComposite, label, PREF_SOURCE_COMPATIBILITY, values34, values34Labels, indent);	
		String[] errorWarningIgnore= new String[] { ERROR, WARNING, IGNORE };
		
		String[] errorWarningIgnoreLabels= new String[] {
			JavaUIMessages.getString("CompilerPreferencePage.error"),  
			JavaUIMessages.getString("CompilerPreferencePage.warning"), 
			JavaUIMessages.getString("CompilerPreferencePage.ignore") 
		};
		label= JavaUIMessages.getString("CompilerPreferencePage.pb_assert_as_identifier.label"); 
		addComboBox(complianceComposite, label, PREF_PB_ASSERT_AS_IDENTIFIER, errorWarningIgnore, errorWarningIgnoreLabels, indent);		
		Control[] allChildren= complianceComposite.getChildren();
		fComplianceControls.addAll(Arrays.asList(allChildren));
		fComplianceControls.removeAll(Arrays.asList(otherChildren));
		
		return complianceComposite;
	}
		
	private void addCheckBox(Composite parent, String label, String key, String[] values, int indent) {
		ControlData data= new ControlData(key, values);
		
		GridData gd= new GridData(GridData.HORIZONTAL_ALIGN_FILL);
		gd.horizontalSpan= 2;
		gd.horizontalIndent= indent;
		
		Button checkBox= new Button(parent, SWT.CHECK);
		checkBox.setText(label);
		checkBox.setData(data);
		checkBox.setLayoutData(gd);
		checkBox.addSelectionListener(fSelectionListener);