Code example for TitledBorder

Methods: setTitle

0
        onActivePropertyChanged(); 
    } 
 
    public void onActivePropertyChanged() { 
        if (activeProperty != null) {
            titledBorder.setTitle(activeProperty.getTitle());
            if (activeProperty.getValueType() == Float.class) {
                setValue(activeProperty.getValue(), activeProperty.getMinValue(), activeProperty.getMaxValue());
            } 
        } 
    } 
 
    public void setValue(float value, float minValue, float maxValue) {
        int sliderValue = (int) (((value - minValue) / (maxValue - minValue)) * 100.0f);
        slider.setValue(sliderValue);
    } 
 
    @Override 
    public void stateChanged(ChangeEvent e) {
        if (activeProperty.getValueType() == Float.class) {