So I'm attempting to learn more about the "this" term. I realize that the term "this" relates to the current object. The object whose constructor or function is being invoked .
So, if I use "this.setLayout," would it look for an object that has the "setLayout" method ?
Assume I extend a class and include other classes in my superclass. Will "this" look for the method in all implemented and extended classes as stated on this page?
Consider my class:
public class GUI extends JPanel implements Runnable, ActionListener
and I employ:
So the compiler will look for the method "setLayout" in all extended and implemented classes until it finds it in Jpanel? I just want to understand how "this" knows what I am trying to do.