Results 1 to 2 of 2
  1. #1
    Basit56 is offline Member
    Join Date
    Aug 2009
    Posts
    48
    Rep Power
    0

    Default Jslider changeListner

    Hi to all :),
    Hope you all will be fine.I want to ask about Jslider Listner.I have a recorder applet and i added JSlider to it but now for sure i supposed to write cangeListner for it so it work properly.Can any one tell me how can i write listner. I want that when i record a sound(record time limit 3 minutes)the slider moves accordingly means in synchronization with the time and as Slider moves the space is left behind is filled with some color and when you press stop button the slider stops, and then when you want to listen your recorded voice , you click on play button and the slider moves with the recorded sound.Please help :(

    Thanks in advance

  2. #2
    THEAniKan is offline Member
    Join Date
    Sep 2009
    Posts
    15
    Rep Power
    0

    Default

    Really the only thing i can answer here is the change listener:

    Java Code:
    public class Demo extends JFrame implements ChangeListener
    ...
    ...
    ...
    public Demo()
    {
    [INDENT]...
    slider.addChangeListener(this);[/INDENT]
    }
    ...
    ...
    ...
    public void stateChanged(ChangeEvent e)
    {
    [INDENT]Object source = e.getSource();
    if(source == slide)
    {
    [INDENT]//do whatever[/INDENT]
    }[/INDENT]}

Similar Threads

  1. How can we zoom a map using JSlider
    By barney in forum AWT / Swing
    Replies: 5
    Last Post: 02-23-2009, 02:48 PM
  2. Got Trouble with JSlider
    By hungleon88 in forum Advanced Java
    Replies: 6
    Last Post: 08-30-2008, 06:02 PM
  3. jmf & JSlider
    By nathanr_kamal in forum AWT / Swing
    Replies: 6
    Last Post: 06-28-2008, 08:56 AM
  4. Scale 2 or more pictures using a JSlider
    By Panchitopro in forum AWT / Swing
    Replies: 4
    Last Post: 05-20-2008, 05:44 PM
  5. Scale 2 or more pictures using a JSlider
    By Panchitopro in forum New To Java
    Replies: 0
    Last Post: 05-05-2008, 06:22 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •