在AWT组件添加透明的JPanel画上 [英] Add transparent JPanel upon AWT Component to paint on
问题描述
我有一个问题:在我的Java应用程序中我有一个AWT组件(不能改变一个)流,并显示一个AVI文件。现在我想在这部电影吸引,想着把一个透明的JPanel上面和借鉴的那一个。
I've got a Problem: In my Java application I've got an AWT Component (cannot change that one) that streams and shows an avi-file. Now I want to draw upon this movie and thought about putting a transparent JPanel above it and draw on that one.
这不工作,因为我既看到了AVI流或绘制的线条而不是两个。
This does not work since I either see the avi-stream or the drawn lines but not both.
我读的地方,AWT不支持组件的透明度 - 但小组是一个JPanel这是能够做到这一点。
I read somewhere that AWT does not support transparency of components - but the panel is a JPanel which is able to do so.
有人可以帮我这一个 - 在此先感谢
Can someone please help me with this one - thanks in advance.
推荐答案
的混合和轻重量级组件文章解释了如何这仅仅是在最近版本的JDK的处理。
The Mixing Light and Heavyweight Components article explains how this is handled only in the most recent version of the JDK.
这篇关于在AWT组件添加透明的JPanel画上的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!