User Activity

hello i have a screen where if i press a button a modal window apears with text and 2 buttons (OK) and (CANCEL) .When i call modalWindow.show() the modal window apears but for 1-2 secconds it flickers . can you help me with this ? Thank you