为什么添加监视器的按钮点击无用

这个是视图

package dialog;
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
public class AddDialog extends JDialog {
    private static final long serialVersionUID = 1L;//定义程序序列化ID
    JButton b1, b2,b3;
    JTextField jtf1, jtf2, jtf3, jtf4, jtf5, jtf6, jtf7,jtf8;
    HandleAddDialog add;
    public AddDialog(JFrame frame) {                      //视图
        super(frame, "添加信息(3200608050 胡成艺)", true);//继承父类
        initView();
        addListener();
    }
        private void initView() {
            Container c = this.getContentPane();
            setLayout(new BorderLayout());//设置布局为BorderLayout
            setBounds(700, 250, 450, 300);
            JPanel jp = new JPanel();//添加JPanel面板
            jp.setLayout(new GridLayout(4, 1));
            JPanel jp1 = new JPanel();
            jp1.setLayout(new FlowLayout(FlowLayout.LEFT, 20, 5));
            JLabel jl1 = new JLabel("学号: ");
            jtf1 = new JTextField(10);//输入学号
            jp1.add(jl1);
            jp1.add(jtf1);
            JLabel jl5 = new JLabel("姓名: ");
            jtf5 = new JTextField(10);//输入姓名
            jp1.add(jl5);
            jp1.add(jtf5);
            JPanel jp2 = new JPanel();
            jp2.setLayout(new FlowLayout(FlowLayout.LEFT, 20, 5));
            JLabel jl2 = new JLabel("身份: ");
            jtf2 = new JTextField(10);//输入身份
            jtf2.setText("学生");
            jtf2.setEditable(false);
            jp2.add(jl2);
            jp2.add(jtf2);
            JLabel jl6 = new JLabel("班级: ");
            jtf6 = new JTextField(10);//输入班级
            jp2.add(jl6);
            jp2.add(jtf6);
            JPanel jp3 = new JPanel();
            jp3.setLayout(new FlowLayout(FlowLayout.LEFT, 20, 5));
            JLabel jl3 = new JLabel("用电量: ");
            jtf3 = new JTextField(10);//输入输入用电量
            jp3.add(jl3);
            jp3.add(jtf3);
            JLabel jl7 = new JLabel("用水量: ");
            jtf7 = new JTextField(10);//输入输入用水量
            jp3.add(jl7);
            jp3.add(jtf7);
            JPanel jp4 = new JPanel();
            jp4.setLayout(new FlowLayout(FlowLayout.LEFT, 20, 5));
            JLabel jl4 = new JLabel("电话: ");
            jtf4 = new JTextField(10);//输入电话
            JLabel jl8 = new JLabel("是否缴费:");
            jtf8 = new JTextField(10);//输入是否缴费
            jp4.add(jl4);
            jp4.add(jtf4);
            jp4.add(jl8);
            jp4.add(jtf8);
            JPanel j = new JPanel();
            j.setLayout(new FlowLayout(FlowLayout.RIGHT, 20, 10));
            b1 = new JButton("添加");//添加信息按钮
            b2 = new JButton("返回");//返回上一届面
            b3 = new JButton("切换教师/学生");//切换教工与学生
            j.add(b3);
            j.add(b1);
            j.add(b2);
            jp.add(jp1);
            jp.add(jp2);
            jp.add(jp3);
            jp.add(jp4);
            c.add(jp, BorderLayout.CENTER);
            c.add(j, BorderLayout.SOUTH);
            b3.addActionListener(new ActionListener() {       //内部类
                public void actionPerformed(ActionEvent e) {
                    if(e.getSource() == b3) {
                    if(jl1.getText().equals("学号: ")) {
                        jl1.setText("职工号:");
                        jl6.setText("工作部门:");
                        jtf2.setText("教工");
                    }
                    else if(jl1.getText().equals("职工号:")) {
                        jl1.setText("学号: ");
                        jl6.setText("班级: ");
                        jtf2.setText("学生");
                    }
                }
                }
            });
            this.setVisible(true);
        }
        private void addListener() {
            add = new HandleAddDialog();
            add.setView(this);
            b1.addActionListener(add);//添加监视器,负责添加单词
            b2.addActionListener(add);
        }
}

这个是控制器

package dialog;
import java.awt.event.*;
import java.util.ArrayList;
import javax.swing.JDialog;
import javax.swing.JOptionPane;
import People.People;
public class HandleAddDialog  extends JDialog implements ActionListener{
    AddDialog view;
    public void setView(AddDialog add) {
        this.view = add;
    }
    @Override
    public void actionPerformed(ActionEvent e) {//实现监视器
        if (e.getSource() == view.b1) {
            ArrayList<People> list = new ArrayList<People>();
            list = MainFrame.list;
            String s1 = view.jtf1.getText();//读取学号
            String s2 = view.jtf5.getText();//读取姓名
            String s3 = view.jtf2.getText();//读取身份
            String s4 = view.jtf6.getText();//读取班级
            String s5 = view.jtf3.getText();//读取用电量
            String s6 = view.jtf7.getText();//读取用水量
            String s7 = view.jtf4.getText();//读取电话
            String s8 = view.jtf8.getText();//读取是否缴费
            if (s1.equals("") || s2.equals("")|| s3.equals("")|| s4.equals("")|| s5.equals("")|| s6.equals("")|| s7.equals("")||s8.equals("")) {
                JOptionPane.showMessageDialog(this, "信息不能为空!");
                return;//判断是否完全输入数据
            }
            for (int i = 0; i < list.size(); i++) {
                if(s1.equals(list.get(i).getNumber())) {
                    JOptionPane.showMessageDialog(this, "学号/职工号不能重复");
                    return;//判断是否是相同学号/职工号
                }
            }
            if(s8.equals("是")||s8.equals("否")) {
                People s = new People(s1, s2, s3, s4, s5, s6, s7,s8);
                MainFrame.list.add(s);
                JOptionPane.showMessageDialog(this, "添加信息成功!");
                MainFrame.save();
                dispose();
            }else {
                JOptionPane.showMessageDialog(this, "请正确输入缴费信息");//判断缴费信息是否正确填写
            }
        } else if (e.getSource() == view.b2) {
            view.dispose();//退出
        }
    }
}

请问为什么点击b1、b2 没有反应啊
感觉是监视器和视图没有连接上,但是也不知道怎么改
actionPerformed里的内容是没有问题的。
如果写把AddDialog里b1、b2添加监视器写成

b1.addActionListener(new HandleAddDialog(this));//添加监视器
b2.addActionListener(new HandleAddDialog(this));

然后 HandleAddDialog里的setView方法换成

public HandleAddDialog(AddDialog addDialog) {
        this.addDialog = addDialog;
    }

这样就可以正常使用
小白啥也不会……拜托大家了

你怎么能确定是监听器没效果。我想是你条件判断问题,你在监听器方法的第一行输出一下e.getSource()