Hi all,

I have problem, I play video via JMF, after video end i need set invisible JWINDOW

Java Code:
package it_player;

import java.awt.Component;
import java.io.File;
import java.io.IOException;
import java.net.URL;
import javax.media.CannotRealizeException;
import javax.media.Manager;
import javax.media.NoPlayerException;
import javax.media.Player;
import javax.media.Time;
import javax.swing.JWindow;

public class MediaTest {

    public static void main(String args[]) throws IOException, NoPlayerException, CannotRealizeException {
        URL mediaURL = new File("d:/bailey.mpg").toURL();
        Player mediaPlayer = Manager.createRealizedPlayer(mediaURL);
        Component video = mediaPlayer.getVisualComponent();
        mediaPlayer.start();
        Time delkaVidea = mediaPlayer.getDuration();
        mediaPlayer.setStopTime(delkaVidea);
        Time delka = mediaPlayer.getMediaTime();
        
            if (mediaURL != null)
            {
                JWindow mediaTest = new JWindow();
                mediaTest.add(video);
                mediaTest.setSize(1024,768);
                mediaTest.setVisible(true);
              
            } 
    } 
}