(こちらを参照)Button
を使用して (垂直に) 中央に配置するにはどうすればよいですか? 使用:FormLayout
final Button button = new Button(shell, SWT.NONE);
button.setText("Button");
final FormData layoutData = new FormData();
layoutData.top = new FormAttachment(50);
layoutData.left = new FormAttachment(0);
layoutData.right = new FormAttachment(100);
button.setLayoutData(layoutData);
私はで終わる
ボタンの上部を中央に配置するように指示したので、これは驚くべきことではありません ( layoutData.top = new FormAttachment(50);
)。代わりにボタンの中心を中心に置くにはどうすればよいですか?