views:

99

answers:

1

I've got a problem. In LayeredPane I have 2 components: heavyweight coponent and JComponent(or any other what I could draw text in) that is placed above the first one. I'd like JComponent to have transparent background, but it has black background. Heavyweight coponent is a component that renders video and JComponent is component what I draw text in. This text should be printed with transparent background.

I tried to use GlassPane but glass content of glassPane was displayed above lightweight components and below heavyweight component.

Is there possibility to draw text above heavyweight coponent (Canvas)?

ps. I can't overload paint method because I got object of class HeavyComponent that is subclass of Canvas.

A: 

A heavyweight component will generally paint over lightweight components.

JMF is quite old. Investigate some of the newer alternatives. See the section labeled "Alternatives" at http://en.wikipedia.org/wiki/Java_Media_Framework

Devon_C_Miller