开发者

Swing's component events

开发者 https://www.devze.com 2023-01-06 10:54 出处:网络
How can I find what event a JComponent can开发者_JS百科 send? From JDK documentation is not so clear to find all the event an object sands.

How can I find what event a JComponent can开发者_JS百科 send?

From JDK documentation is not so clear to find all the event an object sands.

For example a JButton send an ActionEvent but this is not listed into the API of the JButton


All of the events that can be sent by a component follow the same pattern. The component will have a method for each event which looks like addXXXXXListener(XXXX). Just look for the methods that start with "add" and end with "listener"

0

精彩评论

暂无评论...
验证码 换一张
取 消