Does Java have native support for events, similar to that of C#?

前端 未结 9 1988
眼角桃花
眼角桃花 2020-12-19 03:19

I\'m a bit confused from what I\'ve heard Java doesn\'t do events.

But I know that it does GUI events.

Am I missing something? Does java have an event handli

9条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-12-19 04:04

    Swing or AWT, which are the Java UI toolkits, both handle events - check out the official Swing event tutorial for examples. You will need to have written your UI in Swing of course to be able to register listeners for these events.

提交回复
热议问题