Hello Guys this is the program for Seek Bar of a Player. but it is not move as song proceeds. please help Thanks in Advance .
private void jSlider1StateChanged(javax.swing.event.ChangeEvent evt) {
jSlider1 = (JSlider) evt.getSource();
if(player!=null){
jSlider1.getMinimum();
long durationNanoseconds =
(player.getDuration().getNanoseconds());
jSlider1.setMaximum((int) player.getDuration().getSeconds());
int duration=(int) player.getDuration().getSeconds();
int percent = jSlider1.getValue();
long t = (durationNanoseconds / duration) * percent;
Time newTime = new Time(t);
jSlider1.setMajorTickSpacing(30);
player.stop();
player.setMediaTime(newTime);
player.start();

} // TODO add your handling code here:
}