I am trying to make a chat application. So within that when a user1 sends a private chat to user2 ,a popup should show at user2's screen. I did now i need to code to check whether the poped up window is open or close that ,if it is closed i need to popup it again ?

Does anyone know this? If yes , please advice.