JTabbedPane鼠标悬停画图问题 [英] JTabbedPane mouseover paint issue

查看:77
本文介绍了JTabbedPane鼠标悬停画图问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用一个应用程序,当鼠标经过 s.我只见过此错误发生在鼠标悬停时.

I am working with an application that is experiencing painting issues on some users computers when the mouse passes over the tabs in a JTabbedPane. They also occasionally have similar issues on other interactive components like JButtons. I have only ever seen this error occur on mouse overs.

该应用程序正在1.6.0_20上运行,我已经尝试了更新10中推荐的标志,以防D3D出现问题(-Dsun.java2d.d3d = false).

The application is being run with 1.6.0_20 and I have already tried the flag recommended in update 10 in case it was an issue with D3D (-Dsun.java2d.d3d=false).

由于我是新用户,因此无法发布图片来说明此错误.我能想到的最好的例子是在图像上使用Windows油漆橡皮擦会创建与我所看到的类似的东西.

Since I am a new user I cannot post a picture to illustrate this error. The best example I can think of is using Windows paint eraser on an image would create something similar to what I am seeing.

感谢您能提供的任何帮助.

I appreciate any help you can provide.

推荐答案

没有显示您所描述问题的 sscce ,虽然很难具体说明,但这使我想起了与设置

Without an sscce that exhibits the problem you describe, it's hard to be specific, but this reminds me of the rendering artifact associated with setting the opaque property to true without completely rendering the area defined by a component's bounds. In particular, if you override paintComponent() and "do not honor the opaque property, you will likely see visual artifacts." Finally, the default opacity setting of some components varies by Look & Feel, so the effect may be platform dependent.

这篇关于JTabbedPane鼠标悬停画图问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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