SWT Dialog To Front
PasswordDialog dialog = new PasswordDialog(new Shell());
When I ran the code, the main window was up front the the dialog was behind it. I knew this because the only way that I could see it, was with a task manager.
What to do? I searched for a .toFront() method to no avail. Finally I happened on the SWT.ON_TOP integer to use in the constructor, like this:
PasswordDialog dialog = new PasswordDialog(new Shell(SWT.ON_TOP));
Worked like a charm. Hope this helps someone.