
import javax.swing.*;        // java swing sinifini cagir
import java.awt.*;          // java pencere kullanma sinifini cagir
import java.awt.event.*;    //  java pencereyi dinleme sinifini cagir
import BasicWindowMonitor;
import ovalPanelSWP;
import javax.swing.event.*;

public class ovalTestSWF_2000 extends JFrame implements ChangeListener
{
    // Renk secme ornegi
    private ovalPanelSWP p;
    private JSlider cap;
    Color r=Color.lightGray;
    Container c;
    // pencereyi baslatma metodu
    public ovalTestSWF_2000()
    {
    super("JSlider Testi");
    c=getContentPane();
    p=new ovalPanelSWP(30,30,30);
    cap=new JSlider(SwingConstants.HORIZONTAL,0,200,10);
    cap.setMajorTickSpacing(10);
    cap.setPaintTicks(true);
    cap.addChangeListener(this);
    c.add(p,BorderLayout.CENTER);
    c.add(cap,BorderLayout.SOUTH);
    }
    // girdi alanindaki olan olaylari dinleme metodu
    public void stateChanged(ChangeEvent e)
    {
     p.setOvalPanelSWP(30, 30,cap.getValue());
     repaint();
    }

     //=====================================================
      public static void main(String[] args)
      {
      ovalTestSWF_2000 pencere= new ovalTestSWF_2000();
      pencere.addWindowListener(new BasicWindowMonitor());
      pencere.setSize(350,200);
      pencere.setVisible(true);
      }
}
