What is the common way to program action listeners?

前端 未结 6 1721
走了就别回头了
走了就别回头了 2021-01-06 01:10

I just started to learn how to use action listeners. To my understanding it works in the following way:

  1. There are some classes which contains \"addActionLis

6条回答
  •  北荒
    北荒 (楼主)
    2021-01-06 01:22

    Maybe it's not actually at the moment, but I believe that in the nearest future (after Java 7 release) something like this would be the common way:

    listenedObject.addActionListener ( #{doSmth();} );
    

提交回复
热议问题