JMF: video always on top issue

Discussion in 'Java' started by SirThanxALot, Nov 17, 2003.

  1. SirThanxALot

    SirThanxALot Guest

    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
     
    SirThanxALot, Nov 17, 2003
    #1
    1. Advertising

  2. SirThanxALot

    ScoobyCed Guest

    Re: video always on top issue

    "SirThanxALot" <> wrote
    > 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
     
    ScoobyCed, Nov 17, 2003
    #2
    1. Advertising

  3. SirThanxALot

    SirThanxALot Guest

    Re: video always on top issue

    you are right
    http://www.student.kuleuven.ac.be/~m9922490/gui/
    there is a zip file with the code

    "ScoobyCed" <> schreef in bericht
    news:3fb8dad0$0$10417$...
    > "SirThanxALot" <> wrote
    > > 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
    >
    >
     
    SirThanxALot, Nov 17, 2003
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. tochaotic4u
    Replies:
    2
    Views:
    4,061
    tochaotic4u
    Jul 3, 2003
  2. Frank Buss
    Replies:
    0
    Views:
    4,765
    Frank Buss
    Aug 30, 2003
  3. Paul  Smith
    Replies:
    0
    Views:
    4,666
    Paul Smith
    Sep 2, 2003
  4. Replies:
    1
    Views:
    757
    Andrew Thompson
    Jul 20, 2006
  5. Replies:
    0
    Views:
    2,346
Loading...

Share This Page