• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

JSlider and JMF

 
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
 
Marshal
Posts: 70211
280
  • 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?
 
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: 70211
280
  • 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: 70211
280
  • 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.
 
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: 70211
280
  • 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
 
Hug your destiny! And hug this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic