开发者

painting on glassPane is slow

I'm building a domino game in java and I am using modified rectangle2d's to draw my tiles. To drag a tile I use mouse events to change the tiles coordinates and 开发者_开发知识库redraw the JPanel.

This all works great and very smooth, until I start using the frames glassPane, I use the glassPane to be able to drag a tile from one JPanel to another.

It works, but rendering is quite slow when I paint on the glassPane. I've tried to use clipping when repainting, but it makes no difference.

Does anyone have an idea?

thnx.


It seems when a glassPane is visible on your RootPaneContainer, all repaint events behind the GlassPane have their clip set to fill the entire RootPaneContainer. This may be overriding your manually specified clip rect.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜