[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
|
[news.eclipse.platform.swt] Re: SashForm
|
public static void main(String[] args) {
Display display = new Display();
Shell shell = new Shell(display);
shell.setBounds(10,10,300,300);
SashForm form = new SashForm(shell,SWT.NONE);
form.setBounds(10,10,250,250);
new Label(form,SWT.NONE).setText("Label in pane1");
new Button(form,SWT.PUSH).setText("Button in pane2");
new Label(form,SWT.PUSH).setText("Label in pane3");
form.setWeights(new int[] {30,40,30});
shell.open();
while (!shell.isDisposed()) {
if (!display.readAndDispatch()) display.sleep();
}
display.dispose();
}
Ramin Assisi wrote:
> I tried to place a SashForm on a Shell, but it does only
> work when the Shell has a Layout (FormLayout or FillLayout etc.). How can
> I place it
> with pixel-coordinates (setBoundes(..))?