为什么我的Java Applet中的Swing在快速鼠标上闪烁?

时间:2023-01-21 09:01:09

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

我制作了一个带有一些标准GUI组件的Java Applet。我使用了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.

如果我在各种GUI组件上缓慢移动鼠标,一切看起来都很好,但是如果我快速移动鼠标,它就会闪烁。

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

有什么可以让那个讨厌丑陋的重绘? (Core 2 Duo 6300,2GB Ram,Windows XP)

3 个解决方案

#1


3  

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

一种想法是检查您的代码(和/或MigLayout代码)以进行不必要的repaint()操作。

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

自定义UI和布局有时会导致奇怪的问题......

#2


0  

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

你可以在java applet中使用双缓冲来提高屏幕刷新速度。如果需要细节,请询问更多

#3


0  

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

我找到了bugger:我使用了一个自定义的ClosableTabbedPaint类。

#1


3  

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

一种想法是检查您的代码(和/或MigLayout代码)以进行不必要的repaint()操作。

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

自定义UI和布局有时会导致奇怪的问题......

#2


0  

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

你可以在java applet中使用双缓冲来提高屏幕刷新速度。如果需要细节,请询问更多

#3


0  

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

我找到了bugger:我使用了一个自定义的ClosableTabbedPaint类。