I have a modeless dialog which i need to show multiple instances of it displayed at the same time. I have kept the dialog as a member variable in a class which i new and show the dialog. Here there are multiple instances of dialog visible but i am assigning it to the same member variable.(I need to have it as member variable for some processing). It is working fine but i dont understand why this is working. Am i missig something very obvious?
public class ABC {
CMyDialog m_dlg;
onSomeEvent() {
m_dlg = new CMyDialog();
}
}
onSomeEvent
is called multiple times and multiple dialogs are shown. Any idea how Java manages these things? Do i need to keep an array of CMyDialog as member variable instead of just a single class?
Any help is highly appreciated.
Thanks in advance. Nitin K.