s.d
s.d

Reputation: 4185

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.

Upvotes: 2

Views: 245

Answers (1)

camickr
camickr

Reputation: 324108

list.setLayoutOrientation(JList.HORIZONTAL_WRAP);
list.setVisibleRowCount(1);

Upvotes: 4

Related Questions