Guest User

Untitled

a guest
Apr 21st, 2018
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.22 KB | None | 0 0
  1. Object[] contents = list.toArray();
  2. Arrays.sort(contents);
  3. DefaultListModel l=new DefaultListModel();
  4. for(int i=0;i<contents.length;i++)
  5. l.addElement(contents[i]);
  6.  
  7. jList1.setModel(l);
Add Comment
Please, Sign In to add comment