奇怪的摆动重量级 &轻量级混合问题 [英] Weird swing heavyweight & lightweight mixing problem

查看:48
本文介绍了奇怪的摆动重量级 &轻量级混合问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

由于我们已将 Java 版本从 6u5 升级到 6u18(该应用程序在 WinXP 上运行),因此基于 Swing 的应用程序出现问题.

We have a problem in our swing based application since we've upgraded our java version from 6u5 to 6u18 (The application runs over WinXP).

我们的应用程序包含一个位于 JFrame 中的 Canvas 对象.应用程序在画布上绘制内容.

Our application contains a Canvas object which resides in a JFrame. The application draws things on the canvas.

每次我们在画布上拖动轻量级摆动对象(弹出窗口或其他框架)时,都会出现刷新问题.它闪烁 - 变黑.只有在我们将摆动组件从画布上移开并再次单击它后,问题才会解决.

Every time we drag a lightweight swing object (popup or another frame) over the canvas, it has a refresh problem. It blinks - becomes black. The problem only resolves after we move the swing component away from the canvas and click on it again.

我们认为这个问题与画布是重量级对象有关.我们知道在新版本的 java 中对混合重量级和轻量级对象的问题进行了更改.

We think this problem is related to the fact the the canvas is a heavyweight object. And we know there were changes done in the new versions of java on the mixing of heavyweight and lightweight objects issue.

更多细节:1) 我们的问题在 java 6u14 和 6u16 中重现.2) 在 java 6u5 中一切正常.

Some more details: 1) Our problem reproduces in java 6u14 and 6u16. 2) Everything works fine in java 6u5.

还有一件奇怪的事情:我们有两种类型的站运行我们的应用程序.第一种类型有 ATI FireGL7100 PCI-E 显卡.第二种类型具有 Matrox G450 PCI 图形卡.该问题不会在任何 Java 版本的 Matrox 工作站上重现.

Another strange thing: We have 2 types of stations running our application. The first type has a ATI FireGL7100 PCI-E graphics card. The second type has a Matrox G450 PCI graphic card. The problem does not reproduce on the Matrox based station in any java version.

还有一点:http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6829858 - 看起来与我们的问题相似.

One more thing: http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6829858 - looks similar to our problem.

我们的问题熟悉吗?您有什么建议吗(解决方法、显卡的差异如何与此问题相关联的想法)

Is our problem familiar? Do you have any suggestions (workarounds, ideas how the difference in graphics cards is connected to this problem)

希望我说得够清楚了,哟

Hope I was clear enough, Yoav

推荐答案

文章 混合重型和轻型组件 描述了在 JDK 6 更新 12 中对此的支持是如何变化的.这两种显卡可能以不同的方式处理 Z 顺序.您的代码是否有不再需要的解决方法?

The article Mixing heavy and light components describes how support for this changed in JDK 6 update 12. The two video cards may handle Z-order differently. Any chance your code has a workaround that's no longer needed?

这篇关于奇怪的摆动重量级 &轻量级混合问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆