JScrollPane content sizing
- From: MRe <pgdown@xxxxxxxxx>
- Date: Thu, 22 May 2008 01:35:05 -0700 (PDT)
Hi,
I'm new to Java GUI programming, and it's been a constant struggle
to write a GUI that looks like it was on purpose. Well, JScrollPane
has been giving me more trouble than it's worth, so as a last resort,
maybe someone could just tell me how to fix it?..
What I want to do is have a JScrollPane containing a JPanel. The
JPanel should automatically size to the width of the JScrollPane's
viewport, and to the minimum height of the contents of the JPanel. The
idea being that the JPanel's controls spring to fit the width of the
JScrollPane, (never showing a horizontal scroll bar), but be compact
vertically, showing a vertical scrollbar when the JScrollPane is too
small.
Hope that makes some sense; any help greatly appreciated
Thank you,
Kind regards,
Eliott
.
- Follow-Ups:
- Re: JScrollPane content sizing
- From: Knute Johnson
- Re: JScrollPane content sizing
- From: John
- Re: JScrollPane content sizing
- Prev by Date: JOptionPane
- Next by Date: Re: JOptionPane
- Previous by thread: JOptionPane
- Next by thread: Re: JScrollPane content sizing
- Index(es):
Relevant Pages
|