Java 如何跨越gridLayout的2列?

Java 如何跨越gridLayout的2列?,java,swt,eclipse-rcp,jface,grid-layout,Java,Swt,Eclipse Rcp,Jface,Grid Layout,我想在网格布局中跨越右边2柱3柱,但我不知道怎么做,有人能给我一些指导怎么做 示例代码和图像如下所示: @PostConstruct public void PostConstruct(Composite parent) { toolkit = new FormToolkit(Display.getDefault()); form = new ScrolledForm(parent, SWT.V_SCROLL); form.setBoun

我想在网格布局中跨越右边2柱3柱,但我不知道怎么做,有人能给我一些指导怎么做

示例代码和图像如下所示:

@PostConstruct
    public void PostConstruct(Composite parent) {

        toolkit = new FormToolkit(Display.getDefault());
        form = new ScrolledForm(parent, SWT.V_SCROLL);
        form.setBounds(0, 0, 650, 478);
        form.setExpandHorizontal(true);
        form.setExpandVertical(true);
        form.setBackground(toolkit.getColors().getBackground());
        form.setForeground(toolkit.getColors().getColor(IFormColors.TITLE));
        form.setFont(JFaceResources.getHeaderFont());
        form.setText("DOCUMENTATIONS");
        toolkit.decorateFormHeading(form.getForm());
        GridLayout cl = new GridLayout(3, true);
        form.getBody().setLayout(cl);

        sectionSelection = toolkit.createSection(form.getBody(), Section.TITLE_BAR);
        sectionSelection.setText("");
        sectionClientSelection = toolkit.createComposite(sectionSelection);

        sectionClientSelection.setLayout(new GridLayout());
        sectionClientSelection.setLayoutData(new GridData(100, 100));
        sectionSelection.setClient(sectionClientSelection);

        createSelectionSection();

        sectionDefinition = toolkit.createSection(form.getBody(), Section.TITLE_BAR);
        sectionDefinition.setText("");
        sectionClientDefinition = toolkit.createComposite(sectionDefinition);

        sectionClientDefinition.setLayout(new GridLayout());
        GridData gridData = new GridData(SWT.FILL,GridData.VERTICAL_ALIGN_END);
        gridData.horizontalSpan = 2;
        gridData.horizontalAlignment = GridData.FILL;
        sectionClientDefinition.setLayoutData(gridData);
        sectionDefinition.setClient(sectionClientDefinition);

        createDefinitionSection();

    }

您需要设置节的布局数据,而不是节中的组合

sectionDefinition.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false, 2, 1));

@ControlAltDel这是SWT而不是AWT/Swing