TIP: How to include value and label on RotaryKnob without declaring a label!

If you want to have custom data per component instance, you can use the Component dynamic properties, instead of embedding it in the Component’s ID.

// to set the property
knob.getProperties().set("knoblabel","Level");
// to get the property
String labeltext = knob.getProperties()["knoblabel"];
3 Likes