public Object getSelectedBean ( ) { int viewRowIndex = jtable . getSelectedRow ( ) ; if ( viewRowIndex < 0 ) return null ; int modelRowIndex = jtable . convertRowIndexToModel ( viewRowIndex ) ; return ( modelRowIndex < 0 ) || ( modelRowIndex >= beans . size ( ) ) ? null : beans . get ( modelRowIndex ) ; }
Get the currently selected bean or null if none selected .