不要再用1。0的模式了。
用ADDLISTERNER吧?

解决方案 »

  1.   

    .... implements AdjustmentListener,ActionListener
    ...
    s.addAdjustmentListener(this);
    b.addActionListener(this);
    ...
      

  2.   

    b.addActionListener(new BListnener());class BListener implements ActionListener {
          public void actionPerformed(ActionEvent e) {
           //在这里添加按钮click后,你要做的事情
           //例如:
           System.out.println("hello world!");
          }
    }同理滚动条如楼上所说,只不过它需要实现的函数可能不止一个(不想按钮的事件这么简单)