Re: Making Scrollbars Appear
From: kag ("kag")
Date: 07/23/04
- Previous message: Thomas Fritsch: "Re: Making Scrollbars Appear"
- In reply to: Thomas Fritsch: "Re: Making Scrollbars Appear"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Fri, 23 Jul 2004 11:44:51 -0700
REvalidate()! That's the magic bullet! Thanks!
"Thomas Fritsch" <no.spam@www.invalid> wrote in message
news:1090603893.676613@igate1.ops.de...
> kag wrote:
>
> >I have a KPanel class derived from JPanel. It is embedded in a
JScrollPane.
> >Initially the panel is blank and does not require scrollbars. As
information
> >is written to the panel, its size grows until scrollbars are required. I
am
> >overriding getPreferredSize in KPanel. Whenever information is added to
the
> >panel, I call repaint() on the JScrollPane, but this does not result in a
> >call to KPanel's getPreferredSize.
> >
> Use revalidate() on your KPanel, whenever you change the KPanel's
> preferred size.
> See http://mindprod.com/jgloss/scrollbar.html
>
> > If I manually resize the window,
> >getPreferredSize does get called and the scrollbars appear. How can I
get
> >the scrollbars to appear programmatically?
> >
> >
> >
> --
> Thomas<dot>Fritsch<squiggle>ops<dot>de
>
- Previous message: Thomas Fritsch: "Re: Making Scrollbars Appear"
- In reply to: Thomas Fritsch: "Re: Making Scrollbars Appear"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|