• Post Reply Bookmark Topic Watch Topic
  • New Topic

JSlider and JMF

 
Gopinath Ranga
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi friends,
i need a help,my scenario is i have a JSlider,which is corresponding with video playing in the player(JMF).i dont know how to connect this two. (i.e) slider marker will move corresponding to media playing.if playing is stoped slider will not move like wise...

please any body help me
 
Campbell Ritchie
Marshal
Posts: 52558
119
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is a slider the right thing to use? Don't you mean a JProgressBar?
 
pete stein
Bartender
Posts: 1561
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Campbell Ritchie:
Is a slider the right thing to use? Don't you mean a JProgressBar?

A slider sounds more proper to me. AFAIK, a JProgressBar only displays information while a JSlider allows you to interact with the information, to view it and to change it. This seems like what the OP desires to do: allow a change of the JSlider's position to change the corresponding video position.
 
Campbell Ritchie
Marshal
Posts: 52558
119
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by pete stein:
. . . change of the JSlider's position to change the corresponding video position.
OK.

With the JSlider.setValue() method, I presume.
 
Gopinath Ranga
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
dear friends,
i explain once again...

* i would get mediatime and duration is only as long/double.
* in JSlider parameters are integer..
* if using setValue method by type casting it didnot working...
* And important one is the updation of the slider value should be event triggered..and not use of thread,timer...
* because my project is mediaplayer,so i could run all modules..

please any one...
 
Campbell Ritchie
Marshal
Posts: 52558
119
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am surprised you can't get an int by subtracting the start and finish long values.
Apart from that, don't know. Sorry.
 
Sven Goetgeluck
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,

is this open? if yess i"ll post some code to do it

sven
 
Campbell Ritchie
Marshal
Posts: 52558
119
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Sven Goetgeluck:
hi,

is this open? if yess i"ll post some code to do it

sven
We usually suggest not posting code on such old threads, but in this case where there wasn't a proper answer, it might be good to make an exception. Please post the code, and let's see it working
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!