public void displayError(String error) {
        output.setForeground(Color.red);
        JOptionPane.showMessageDialog(this, error, "Error", JOptionPane.ERROR_MESSAGE);
        output.setForeground(Color.black);
    }