player.setLoopCount(count); // play count times
player.prefetch(); // prefetch
player.realize(); // realize
MediaComponent media = new MediaComponent(player);
form.addComponent(BorderLayout.CENTER, media);
form.show();
player.start();
//player.start(); // and start