Re: Horizontal wrap with JScrollPane



Krzysztof Bink schrieb:

My own component contains elements, these elements can be laid out
horizantaly, horizontaly with wrapping etc. This component is usually
wrapped in JScrollPane.

I have problem with HORIZONTAL_WRAP - in that orientation horizontal
scrollbar shoud be disabled. But I don't know how shoud I compute
preferred width for my component. For example when JScrollPane is
resized by layout manager I need to adapt number of elements displayed
in row to new width.

Why?

AFAIR just the scroll pane (and view port) gets resized but not your component.

Bye
Michael

.