List of utility methods to do JList Item
Object | getItemList(JList anJList, int index) getSelecetdList return anJList.getModel().getElementAt(index);
|
List | getItems(JList list) _more_ List items = new ArrayList(); ListModel model = list.getModel(); for (int i = 0; i < model.getSize(); i++) { items.add(model.getElementAt(i)); return items; |
String[] | getJListItemAry(javax.swing.JList jlist) get J List Item Ary int size = jlist.getModel().getSize(); String[] ary = new String[size]; for (int i = 0; i < size; i++) { ary[i] = (String) jlist.getModel().getElementAt(i); return ary; |
Object[] | getListItems(JList list) get List Items ListModel lm = list.getModel(); synchronized (lm) { Object[] ret = new Object[lm.getSize()]; for (int i = 0; i < ret.length; i++) { ret[i] = lm.getElementAt(i); return ret; |