Chrissirhc
Programmer
Hello I am trying to call a method in nested panel which is two panels down(intuitevely speaking). Anyway this method will not get called method. I cast the container to the correct type of course, but should getParent() not pass a reference?
This is what I've done
System.out.println("Hope this works"
(((TheRightObject)(getParent().getParent()).aMethodInTheRightObject();
System.out.println("Did it work?"
System.out.println("33333333333333"
How comes the only thing that runs is Hope this works.
and nothing else runs Did it work? does not get printed nor do the 3's. And most importantly aMethodInTheRightObject() does not run.
Please could someone help
thanks in advance
Chris
PS I've tried all sorts such as putting the second call of getParent() in the panel one up, but this has not made a different. It is seeming like you cannot get the parent of a perent and call methods on it.
This is what I've done
System.out.println("Hope this works"
(((TheRightObject)(getParent().getParent()).aMethodInTheRightObject();
System.out.println("Did it work?"
System.out.println("33333333333333"
How comes the only thing that runs is Hope this works.
and nothing else runs Did it work? does not get printed nor do the 3's. And most importantly aMethodInTheRightObject() does not run.
Please could someone help
thanks in advance
Chris
PS I've tried all sorts such as putting the second call of getParent() in the panel one up, but this has not made a different. It is seeming like you cannot get the parent of a perent and call methods on it.