import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import javax.swing.event.*;

public class jslider001 extends JFrame implements ChangeListener
{
	JSlider slider, slider2;
	
	public jslider001()
	{
		setTitle("erwer");
		setSize(400,100);
		setDefaultCloseOperation(EXIT_ON_CLOSE);
		slider = new JSlider();
		slider.addChangeListener(this);
		slider2 = new JSlider();
		slider2.addChangeListener(this);
		
		setLayout(new GridLayout(2,1));
		add(slider);
		add(slider2);
		setVisible(true);
	}

	public void stateChanged(ChangeEvent e)
	{
		System.out.println( ((JSlider)e.getSource()).getValue());
	}
		
	public static void main(String[] a)
	{
		jslider001 f = new jslider001();
	}
}