我的 jcomponent 菜单有问题。菜单工作正常,但当菜单关闭到父面板中时,仍会留下阴影(灰色),其大小与 jpopup 菜单相同。 我不得不提一下,jpopup 菜单的父级 jpanel 具有上面提到的颜色,但透明度设置为 25%。
最佳答案
I have to mention that the jpanel that is the parent of the jpopup menu has the color mentioned above but has the transparency set to 25%.
参见Background With Transparency针对可能出现的问题以及一些解决方案。
关于java - swing jpopupmenu 和 jpanel 正在显示阴影,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19522510/