I am having 3 Jinternal frames. When I am calling second Internalframe through a button in first Internalframe, it is working. But when I am calling third Internalframe through a button in second Internalframe, third Internalframe is not opened. But When I am calling that same third frame through a button in Homepage (eventhough the second frame is opened),third frame is opened and working fine. Why that third Internalframe is not opened from second Internalframe?

This is my code for calling second InternalFrame from the first InternalFrame:
HomePage page;
PurchaseInvoice PI=new PurchaseInvoice(this,docentry);
page.jDesktopPane1.add(PI);
this.dispose();
PI.moveToFront();

It is working fine.

This is my code for calling third InternalFrame from the second InternalFrame:
HomePage page;
PurchaseReturn PR=new PurchaseReturn(this,docentry);
page.jDesktopPane1.add(PR);---
this.dispose();
PR.moveToFront();

But when i executed this code,due to the thirdline(marked as ---),that corresponding internal frame is not opened.