I am now working with an application.
In that there are lots of child JFrame
objects there.
Each time the button to show child frame is clicked a new instance of child frame is created and hence multiple copies of same child frame is created.
How can I prevent multiple copies of child node?
You need to track whether child frame has already opened with button click. If it is, then dont create new form. If not create new child form and display it.
Or if your bussiness logic permits then, go for model dialogs. But better you ask your manager.
And as
manoj
pointed out, you can useboolean
data types to flag displaying new form.