static int listRowCount(JList list) { ret list == null ? 0 : swing(func -> int { list.getModel().getSize() }); }