Java List with line separation
问题 Hey, how do i make my java SWT list look like here http://flavio.tordini.org/minitunes I mean that each element is separated by a line from eachother. Or i there any other solution to have a list like in the minitunes, so i can add number.. etc. 回答1: You should use ListCellRenderer to add the separators at specific positions... jList1 = new javax.swing.JList(); //String[] strings = { "Item 1", "Item 2", "Item 3", "Item 4", "Item 5" }; jList1.setModel(new javax.swing.AbstractListModel() {