Why does Swing in my Java Applet flicker on fast mouse over?

北城余情 提交于 2019-12-13 15:22:27

问题


I made a Java Applet with some Standard GUI Components on it. I used the MigLayout Manager.

If I move the mouse slowly over the various GUI Components everything appears to be fine, but if I move the mouse fast, it flickers.

What could make that nasty ugly redraw? (Core 2 Duo 6300, 2GB Ram, Windows XP)


回答1:


One thought would be to check your code (and/or the MigLayout code) for unnecessary repaint() operations.

Custom UIs and layouts can cause weird problems sometimes...




回答2:


you could use double buffering in java applet to improve screen refreshing speed. ask more if details needed..




回答3:


I found the bugger: I used a custom ClosableTabbedPaint Class.



来源:https://stackoverflow.com/questions/147802/why-does-swing-in-my-java-applet-flicker-on-fast-mouse-over

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!