static void selectedRowCountListButton_min_update(JList list, int min, JButton b, S text) { int c = list.getSelectedIndices().length; setEnabled(b, c >= min); setText(b, c > 0 ? text + " (" + c + ")" : text); }