void (boolean value) { MyErrorPanel errorPanel = getErrorPanel(); if (errorPanel != null) { if (value != trafficLightVisible) { trafficLightVisible = value; updateTrafficLightVisibility(); } repaint(); } }