
public class TestComposite extends Composite ...{
private Text text;
/** *//**
* Create the composite
* @param parent
* @param style
*/
public TestComposite(Composite parent, int style) ...{
super(parent, style);
setLayout(new GridLayout());
createArea(this);
}
private void createArea(Composite parent)...{
text = new Text(this, SWT.BORDER);
text.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
final Button button = new Button(this, SWT.NONE);
button.setText("button");
}
@Override
public void dispose() ...{
super.dispose();
用户评论