There is a program , which displays a windowwhenever a button is pressed but the problem is , i want the windowto be displayed only once even if i click it 10 times or infinitetimes . How can i achieve that .