Originally posted by Dirk Schreckmann:
Here's a hint...
Inside class A, make this change:
Now, frame c will be disposed of, if frame b has created one. Otherwise you'll still throw an exception.
Was this enough of a hint?
Originally posted by John Utting:
Rajesh,
You are trying to invoke the instance methods
hide() and dispose() using the class reference (B_Frame) rather than using an object of the class.
Try the following:
public void closeChildFrame(B_Frame child)
{
System.out.println("close()");
child.hide();
child.dispose();
}
When youi call the closeChildFrame() method pass a reference to an object of type B_Frame.
Hope this helps.
Originally posted by Roy Ben Ami:
oops.
java HelloWorld