Dear John,
I am deeply grateful to you for your kind cooperation.
I made changes in closeChildFrame method. It is ok. but it is giving problem when i call that method.
please see this one.
Thank you very much.
Yours
Rajesh
jMenuItem_close.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
closeChildFrame();
}
});
public void closeChildFrame(B_Frame child)
{
System.out.println("close()");
child.hide();
child.dispose();
}
error : cannot be applied to closeChildFrame();
please help me, what changes shall i do to avoid this error.
I am new to
java.
Thanks once again.
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.