JMF: video always on top issue

S

SirThanxALot

Programmers of the world,

Here's the issue ;)

I have a JFrame:
The contentPane is a Component ( new Component() )
On top of that I display a video file, it turned out that this is a
com.sun.media.renderer.video.HeavyComponent
Now, i want some JLabels to be displayed on top of that, partially covering
the video
To achieve that, I add the pictures with something like
getContentPane.add(new Label("blablabla",0));
I expected the video to be partially covered by my Labels, however
the labels are displayed under the movie.

I tried to figure out what was goiing on, so i tried to layer 2 movies
and it turned out that with the same code, sometimes the first movie was on
top and sometimes the other
I think this is explainable in terms of buffering: the latest movie gets the
component on the top.

any ideas to work around this?

kind regards,
SirThanxALot
 
S

ScoobyCed

SirThanxALot said:
Programmers of the world,

Here's the issue ;)

I have a JFrame:
The contentPane is a Component ( new Component() )
On top of that I display a video file, it turned out that this is a
com.sun.media.renderer.video.HeavyComponent
Now, i want some JLabels to be displayed on top of that, partially covering
the video
To achieve that, I add the pictures with something like
getContentPane.add(new Label("blablabla",0));
I expected the video to be partially covered by my Labels, however
the labels are displayed under the movie.

I tried to figure out what was goiing on, so i tried to layer 2 movies
and it turned out that with the same code, sometimes the first movie was on
top and sometimes the other
I think this is explainable in terms of buffering: the latest movie gets the
component on the top.

any ideas to work around this?

kind regards,
SirThanxALot

Some sample code would be better. Now you may try to double-buffer the video
picture, and update the JFrame.

Scooby-Ced
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,578
Members
45,052
Latest member
LucyCarper

Latest Threads

Top