int before = nativeGetSelected(); int after;  nativeRemove (index); after = nativeGetSelected();   if ((before == index) && (after >= 0)) {  ((Choice) awtComponent).select (((Choice) awtComponent).getItem (0)); postItemEvent (((Choice) awtComponent).getItem (0), ItemEvent.SELECTED); }
if( index == 0 && selected == 0 ) selected = -1; nativeRemove( index );
  public void remove (int index)  {    int before = nativeGetSelected();    int after;        nativeRemove (index);    after = nativeGetSelected();        /* Generate an ItemEvent if we are removing the currently selected item       and there are at least one item left. */    if ((before == index) && (after >= 0))      {        // Must set our state before notifying listeners	((Choice) awtComponent).select (((Choice) awtComponent).getItem (0));        postItemEvent (((Choice) awtComponent).getItem (0), ItemEvent.SELECTED);      }  }