开发者

draw by request instead of drawing with specified fps

how can I update image by my own (when model changes) or system (when other window corrupted image) repaint request and not to use FPSAnim开发者_高级运维ator?


One approach is to use the Model-View-Controller pattern, with the controller having a timer that notifies the view(s) only when required. I generally prefer javax.swing.Timer, as the action event handler executes on the event-dispatching thread.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜