Use Shell#setMinimumSize(int, int)
like this:
public class MyDialog extends Dialog
{
public static void main(String[] args)
{
new MyDialog(new Shell()).open();
}
public MyDialog(Shell parentShell)
{
super(parentShell);
setShellStyle(SWT.RESIZE | SWT.DIALOG_TRIM);
}
@Override
protected Control createDialogArea(Composite parent)
{
Composite container = (Composite) super.createDialogArea(parent);
getShell().setMinimumSize(400, 300);
new Button(container, SWT.PUSH).setText("Some content here");
return container;
}
}
This will restrict the user from reducing the size below a width of 400 and a height of 300.
Keep different screen resolutions in mind though, as an enforced minimal size might exceed the available screen size...