Skip to content

Commit 40c0663

Browse files
author
zhourenjian
committed
Fixed bugs that ScrollBar does not behavior correctly and its layout is not positioned as expected.
1 parent 85ed253 commit 40c0663

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

tests/net.sf.j2s.test.swt/src/net/sf/j2s/test/swt/widgets/TestScrollBar.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
import org.eclipse.swt.layout.FillLayout;
88
import org.eclipse.swt.layout.GridData;
99
import org.eclipse.swt.layout.GridLayout;
10+
import org.eclipse.swt.widgets.Button;
1011
import org.eclipse.swt.widgets.Composite;
1112
import org.eclipse.swt.widgets.Display;
1213
import org.eclipse.swt.widgets.Label;
@@ -73,8 +74,8 @@ protected void createContents() {
7374

7475
final Composite composite_2 = new Composite(composite, SWT.H_SCROLL | SWT.V_SCROLL);
7576
composite_2.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
76-
composite_2.setLayout(new GridLayout());
77-
77+
composite_2.setLayout(new FillLayout());
78+
new Button(composite_2, SWT.PUSH).setText("Hello World");
7879
composite_2.getVerticalBar().addSelectionListener(new SelectionAdapter() {
7980

8081
@Override

0 commit comments

Comments
 (0)