[ui] fixed a defect that caused an org.eclipse.swt.SWTException to be raised when running a test (Issue #48)