AFAIK ButtonGroup
をResourceEdit#GUIから取得できません。グループ名はRadioButton
に限られます。しかし、コードを通じてButtonGroup
にRadioButton
を追加することは可能です。 、
Form form = (Form) this.startApp(resources, null, true);
RadioButton rb1 = this.findRadioButton(form);
RadioButton rb = this.findRadioButton1(form);
ButtonGroup bg = new ButtonGroup();
bg.add(rb);
bg.add(rb1);
bg.setSelected(0);
StateMachine(String resFile)
コンストラクタ(あなたのMIDletクラスの内部でこのコードを使用)を呼び出すために、StateMachine()
コンストラクタ(コンストラクタの内部でこのコードを使用)を呼び出すために、次のコード、
を参照してください
StateMachine sm = new StateMachine("/Sample.res");
RadioButton rb1 = sm.findRadioButton(Display.getInstance().getCurrent());
RadioButton rb = sm.findRadioButton1(Display.getInstance().getCurrent());
ButtonGroup bg = new ButtonGroup();
bg.add(rb);
bg.add(rb1);
bg.setSelected(0);
あなたが書いたのは私たちの計画Bでしたが、面白い情報です。ありがとう – mdelolmo