public int showDialog(){
  m_Result=CANCEL_OPTION;
  int[] origSelected=m_List.getSelectedIndices();
  setVisible(true);
  if (m_Result == CANCEL_OPTION) {
    m_List.setSelectedIndices(origSelected);
  }
  return m_Result;
}

public int showDialog ( ) { m_Result = CANCEL_OPTION ; int [ ] origSelected = m_List . getSelectedIndices ( ) ; setVisible ( true ) ; if ( m_Result == CANCEL_OPTION ) { m_List . setSelectedIndices ( origSelected ) ; } return m_Result ; }
pops up the modal dialog and waits for cancel or a selection .
