开发者

Swing event not fired by a user

Which are other events than timer not fired by user interactio开发者_高级运维n but automatically by the system?


I will say that none or better all.

Thats depend of that what are you doing in the system. You can fire all type of events in your application. It can be sad that some of them are fired by user interaction, bu it is up to You to decide that what the interaction.


A reasonable distinction is between events entering the AWT EventQueue through "the system" and those explicitly queued (possibly through AWT libraries). Without any permissions these will come through EventQueue.invokeLater and EventQueue.invokeAndWait, causing an InvocationEvent. javax.swing.Timer and revalidate are typically implemented with invokeLater. It is also possible to get the current EventQueue instance a post any event you want.

It is also possible to go through "the system" to cause events, such as repaint and java.awt.Robot.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜