public void actionPerformed(ActionEvent e) { String actionCommand = e.getActionCommand(); if (actionCommand == "Low-pass") filter.setLowpass(true); else if (actionCommand == "High-pass") filter.setLowpass(false); }