Force JScrollPane to scroll in one direction only
From: Rene Ruppert (rener_at_incca.com)
Date: 10/31/03
- Previous message: Jörg Marti: "Make a column in a JTable invisible"
- Next in thread: Thomas Fritsch: "Re: Force JScrollPane to scroll in one direction only"
- Reply: Thomas Fritsch: "Re: Force JScrollPane to scroll in one direction only"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Fri, 31 Oct 2003 15:04:13 +0100
Hi,
is there a way to force a JScrollPane to display a vertical scrollbar only
if the amount of components cannot be displayed within the visible area?
Background: I want to create a kind of thumb view where an unknown number of
thumbnails will be inserted. As long as there's space for another item it
will be displayed within the same line; if not it will be wrapped to the
next line. If the number of lines exceeds the available vertical space a
vertical scrollbar will be shown.
If the window is resized the thumbs are supposed to be wrapped according to
the current width.
I tried the following without succes:
- setHorizontalScrollBarPolicy() to never
- use FlowLayout Manager
- use GridLayout
I found lots of articles an Google - but all without a real solution.
Please help! :-(
cu
Rene
- Previous message: Jörg Marti: "Make a column in a JTable invisible"
- Next in thread: Thomas Fritsch: "Re: Force JScrollPane to scroll in one direction only"
- Reply: Thomas Fritsch: "Re: Force JScrollPane to scroll in one direction only"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]