Alternate of C# Events in Java

后端 未结 4 1824
迷失自我
迷失自我 2020-12-24 02:55

I am .Net developer. i want to know that is there any event handling mechanism in Java for Events Handling like C#.

what i want to do is i want to raise/fire an even

4条回答
  •  眼角桃花
    2020-12-24 03:43

    Check out this tutorial. It goes through some of the Swing event handling stuff that you have come across in your searches, but the concepts are pretty general. In simple terms, event handlers maintain a collection of listeners (implementing an interface) and iterate over them when they fire an event, calling the method in the interface.

提交回复
热议问题