Force JList to NOT wrap at all?
问题 Is there a possibility to force JLists to display all items on one line? setOrientationLayout() does not give you that option. 回答1: list.setLayoutOrientation(JList.HORIZONTAL_WRAP); list.setVisibleRowCount(1); 来源: https://stackoverflow.com/questions/7144689/force-jlist-to-not-wrap-at-all