Пример #1
0
 /** List results by alphabetical name */
 private void listByProgramName() {
   int nresult = datasets.size();
   String res[] = new String[nresult];
   for (int i = 0; i < nresult; i++) res[i] = (String) datasets.getElementAt(i);
   Arrays.sort(res);
   datasets.removeAllElements();
   for (int i = 0; i < nresult; i++) datasets.addElement(res[i]);
 }
Пример #2
0
 public String[] getNames() {
   String[] names = new String[table.size()];
   names = table.keySet().toArray(names);
   Arrays.sort(names);
   return names;
 }
Пример #3
0
 /** sorts the user list and rebuilds the user list from the sorted user vector, */
 public void updateList() {
   Object[] tmp = users.toArray();
   Arrays.sort(tmp);
   userList.setListData(tmp);
 }