As I noted in my comment, your problem lends itself well to solving through creation of an SSCCE. In fact, I did one myself using your code snippet and some of my code:
import java.awt.Dimension;
import javax.swing.*;
public class Foo001 {
private static void createAndShowUI() {
DefaultListModel model = new DefaultListModel();
JList sList = new JList(model);
for (int i = 0; i < 100; i++) {
model.addElement("String " + i);
}
sList.setSelectionMode(ListSelectionModel.SINGLE_INTERVAL_SELECTION);
sList.setVisibleRowCount(-1);
sList.setLayoutOrientation(JList.HORIZONTAL_WRAP);
JFrame frame = new JFrame("Foo001");
frame.getContentPane().add(new JScrollPane(sList));
frame.getContentPane().setPreferredSize(new Dimension(400, 300));
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.pack();
frame.setLocationRelativeTo(null);
frame.setVisible(true);
}
public static void main(String[] args) {
java.awt.EventQueue.invokeLater(new Runnable() {
public void run() {
createAndShowUI();
}
});
}
}
Since I cannot reproduce your problem with my code, I must conclude that your problem lies elsewhere in code that you've not shown us. Again, if you can create and post your SSCCE, we will likely be able to help answer your question, but until then, I'm not sure if we can even guess what the problem is.