* the new element
*/
@SuppressWarnings("unchecked")
public Object set(int index, Object element) {
Object obj = elements.set(index, element);
BView v = (BView) rows.set(index, null);
if (v != null) {
// we have to remove() old views
v.remove();
}
// fix the focus if necessary
if (v.hasFocus()) {
getScreen().setFocus(getRow(index));
}
refresh();
return obj;