Add listener to ArrayList

前端 未结 8 1331
再見小時候
再見小時候 2020-12-09 17:14

I have an ArrayList which I add some Objects to it dynamically, and I have a JButton. The ArrayList is empty when running my program and the JButton is set to setEnabled(fal

8条回答
  •  南笙
    南笙 (楼主)
    2020-12-09 17:40

    If you write your own List implementation, as @Jon Skeet suggests, you can give it an EventListenerList. The API outlines the relevant methods.

提交回复
热议问题