public JToggleGroup(int type,ListModel data,ListSelectionModel selection){
  setLayout(new BoxLayout(this,m_axis));
  m_type=type;
  m_data=data;
  m_sel=selection;
  if (m_type == RADIO) {
    m_group=new ButtonGroup();
  }
  m_lstnr=new Listener();
  m_sel.addListSelectionListener(m_lstnr);
  if (m_data.getSize() > 0)   initUI();
  setFocusable(false);
}

public JToggleGroup ( int type , ListModel data , ListSelectionModel selection ) { setLayout ( new BoxLayout ( this , m_axis ) ) ; m_type = type ; m_data = data ; m_sel = selection ; if ( m_type == RADIO ) { m_group = new ButtonGroup ( ) ; } m_lstnr = new Listener ( ) ; m_sel . addListSelectionListener ( m_lstnr ) ; if ( m_data . getSize ( ) > 0 ) initUI ( ) ; setFocusable ( false ) ; }
create a new jtogglegroup .
