GChoicePeer(GToolkit toolkit, Choice target) {
   super(toolkit, target);
   int itemCount = target.getItemCount();
   for (int i = 0; i < itemCount; i++) add(target.getItem(i), i);
   int selectedIndex = target.getSelectedIndex();
   if (selectedIndex >= 0 && itemCount > 0) select(selectedIndex);
 }
 private void postItemEvent(int index) {
   Choice c = (Choice) target;
   GToolkit.postEvent(
       new ItemEvent(c, ItemEvent.ITEM_STATE_CHANGED, c.getItem(index), ItemEvent.SELECTED));
 }