Color () { if (slider.isEnabled()) { if (slider.getClientProperty(PRESSED_PROPERTY) == Boolean.TRUE) { return UIManager.getColor("Slider.pressedColor"); } else if (slider.getClientProperty(HOVER_PROPERTY) == Boolean.TRUE || slider.hasFocus()) { return UIManager.getColor("Slider.focusedColor"); } else { return UIManager.getColor("Slider.foreground"); } } else { return UIManager.getColor("Slider.disabledForeground"); } }