title: Make a seek bar for media player.
body: <p>I am making a media player using JMF, I want to use my own control components
  Can anyone please help me in making a seek bar for media player so that it can play song according to the slider position.</p>
  
  <p>Just suggest me some logic, I can figure out the coding part afterwards</p>
  
  <pre><code>if(player!=null){
      long durationNanoseconds = 
      (player.getDuration().getNanoseconds());
      durationbar.setMaximum((int) player.getDuration().getSeconds());
      int duration=(int) player.getDuration().getSeconds();
      int percent = durationbar.getValue();
      long t = (durationNanoseconds / duration) * percent;
      Time newTime = new Time(t);
      player.stop();
      player.setMediaTime(newTime);
      player.start();
      mousedrag=true;
  </code></pre>
  
  <p>Here is the code. Now how can I make the slider move along with the song?
  Slider works when I drag/click on it, but it doesn't move with the song.</p>