public void updateBPM() { if (model != null) { int bpm = model.getBPM(); if (bpm == 0) { if (bpmOutputLabel != null) { bpmOutputLabel.setText("offline"); } } else { if (bpmOutputLabel != null) { bpmOutputLabel.setText("Current BPM: " + model.getBPM()); } } } }