O'Reilly logo
  • Michael ss thinks this is interesting:

In our case, we want the MyFrame class itself to handle these events. Therefore, we pass the this parameter to the addWindowListener class.

From

Cover of Java Programming

Note

我们希望myframe来处理window event故参数this,从note得,一般不用传this的