}
SwingUtilities.invokeLater(new Runnable() {
public void run() {
JFrame window = new JFrame("Swing Video Player");
JDesktopPane panel = new JDesktopPane();
window.add(panel);
for (int i = files.length - 1; i >= 0; --i) {
File file = files[i];
JInternalFrame frame = new JInternalFrame(file.getName());
frame.setResizable(true);
frame.setClosable(true);
frame.setIconifiable(true);
frame.setMaximizable(true);
frame.setLocation(i * 100, i * 100);
final VideoPlayer player = new VideoPlayer(file);
player.setPreferredSize(new Dimension(640, 480));
player.setControlsVisible(true);
frame.add(player, BorderLayout.CENTER);
frame.pack();
panel.add(frame);
frame.setVisible(true);
javax.swing.Timer timer = new javax.swing.Timer(5000 * i, new ActionListener() {
public void actionPerformed(ActionEvent evt) {
player.getMediaPlayer().play();
}