728x90
728x90
HorizontalAlignment
-
GridLayout 에서 가로로 꽉 차게 하는 법(horizontal fill)JAVA/SWT 2020. 10. 12. 08:38
// Column 이 3개인 GridLayout 생성 Composite comp = new Composite(child, SWT.NONE); comp.setLayout(new GridLayout(3, true)); // 버튼 3개 생성 Button b1 = new Button(comp, SWT.NONE); b1.setText("1"); Button b2 = new Button(comp, SWT.NONE); b2.setText("2"); Button b3 = new Button(comp, SWT.NONE); b3.setText("3"); 버튼이 가로로 꽉 차도록 확장시켜보자 GridData gd = new GridData(SWT.FILL, SWT.NONE, true, false); b1.setLayoutD..