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
I don't think that Java has a direct syntax for doing that, unless you start playing with reflection (which is of course possible, but I don't consider it very clean).
At the point where you want to make the call, your "this" refers to an anonymous subclass of MouseAdapter.
The cleanest approach may be to create a private method, let's call it X, in TheTable, and have the adapter call that function.
Now, because that method X is in the TheTable, it doesn't know that it is inside a panel so it doesn't have any way of activating that function. If you are sure that every table is inside a panel, then you can add a panel reference field to your Table class, initialize it when it is created (you may need to modify the constructor on OnePanel), and then make the call from the method in TheTable.
If the panel method you are ultimately trying to explore not part of JPanel, you may need to create and pass interfaces.