I have a table screen, and if a user right clicks on a specific row, than a pop up menu will appear, and if a
user chooses an option from the pop up menu, than another screen will appear displaying information relating to
the table row.
This is all working fine. The screen appears and displays the relevant information. However, when the screen appears,
I get an exception telling me "ADDING A WINDOW TO A CONTAINER". And, the whole application freezes.
This is snippets from the code that i am using:
and this is the exception that im getting
Exception occurred during event dispatching:
java.lang.IllegalArgumentException: adding a window to a container
Thanks Rob and Maneesh. It does work, and i no longer get an exception.
But now I discovered another problem.
The screen comes up when you select it from the popup menu. but it is only
focusable when i close the previous window.
I cannot close or do anything to that screen unless the previous screen is closed.
I did use the setFocusable() and setEnabled() methods but I still can't do anything to
Any ideas as to why this is happening will be greatly appreciated.
Thanks again for your help to my previous problem.