We are trying to create an application using the LWUIT Resource Editor as much as possible, it’s to say, avoiding creating the UI by code if we can.
We found out there is the possibility to assign a group to a RadioButton by setting the corresponding property on the Resource Editor tool.
So, as we need to implement some functionality for those radio buttons, how can we get the reference to that ButtonGroup instance that the UIBuilder has created (I suppose)?
And yes, considering we are using the Resource Editor tool to generate our midlets, the “custom” code is written on the StateMachine class.
Regards.
AFAIK you can’t get
ButtonGroupfrom ResourceEdit#GUI. You can only possible to getRadioButtongroup name. But possible to add theRadioButtonintoButtonGroupthrough your code. See the following code,For calling
StateMachine()constructor(use this code inside of constructor),For calling
StateMachine(String resFile)constructor(use this code inside of your MIDlet class),