I have the following situation I think would be best to show in sample program code. I have a Java class that extends JPanel. In this class are two objects wh
To access a method on the Outer class, you need to use the syntax of Outer.this.method().
So in this case, to access a method on the "TheTable" class from the listener, you should use TheTable.this.callMethod().
I assume that TopPanel has added to it the TheTable. In this case, you could do something like:
mouseClicked(...) {
TopTable t = (TopTable)TheTable.this.getParent();
t.MethodToFire();
}
This is a direct answer to the question, not necessarily the "best" way to do it. A type-safe composition approach would be a better long-term solution.