Reputation: 554
I want to put text inside the composite and group, but for some reason, the text didn't show up on the UI. Can anyone give me some suggestion? thank you!
data = new GridData(GridData.HORIZONTAL_ALIGN_FILL);
data.horizontalSpan = 2;
Group group1 = new Group(shell, SWT.SHADOW_IN);
group1.setText("This is my group");
group1.setLayoutData(data);
Text text = new Text(group1, SWT.NONE);
text.setText("Group test with label");
Upvotes: 1
Views: 1196
Reputation: 554
group1.setLayout(new RowLayout(SWT.VERTICAL));
this can solve the problem.
Upvotes: 1