int function ( ) { List < Integer > loc0 = getSelectedIndices ( ) ; if ( loc0 . size ( ) > 1 ) { return - 2 ; } else if ( loc0 . size ( ) == 0 ) { return - 1 ; } return loc0 . get ( 0 ) . intValue ( ) ; }
returns the first selected index ; returns -1 if there is no selected item . concode_field_sep JScrollPane scrollPane concode_elem_sep boolean checkbox concode_elem_sep Vector<T> tableList concode_elem_sep DefaultTableModel model concode_elem_sep int DEFAULT_WIDTH concode_elem_sep int DEFAULT_HEIGHT concode_elem_sep JTable table concode_field_sep void addListSelectionListener concode_elem_sep void init concode_elem_sep List<T> getSelectedValues concode_elem_sep JScrollPane getSwingComponent concode_elem_sep void removeSelectedRows concode_elem_sep void clear concode_elem_sep T getSelectedValue concode_elem_sep void setListData concode_elem_sep void setEnabled concode_elem_sep void setSize concode_elem_sep JTable getTable concode_elem_sep JScrollPane getScrollPane concode_elem_sep List<Integer> getSelectedIndices concode_elem_sep void addMouseListener