MessageBox doesn't display on

Hi folks

I am using the following code to display a messagebox and get the response via a variable, however the box only draws up after the calling code goes out of focus not when it is called.

Any idea what I am doing wrong?

		MessageBox.showPlain(Icon.QUESTION, "Please confirm ...", "Are you sure you wish to ....?", new MessageBoxListener()
			public void buttonClicked(ButtonId buttonId)
		}, ButtonId.YES, ButtonId.NO);