开发者

draw by request instead of drawing with specified fps

开发者 https://www.devze.com 2023-03-04 07:40 出处:网络
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-Cont

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

精彩评论

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