Urgent: Need help on how to revalidate JScrollPan

Hello,

I can't get on with my programming work, so I would be very thankful for getting some help...

I have a component, let's call it root. This component has a layout manager.

With this layout manager a added a JScrollPane, which should scroll my own component:

JScrollPane scrPane = new ScrollPane(myOwnJComponent);

root.add(scrPane, constraint);

My class myOwnJComponent overwrites the getPreferredSize() method.

Now my JComponent should be able to grow or shrink dynamically and the scrollbars always should adapt to its current size. How do i tell the JScrollPane to take notice of a the new preferred component size?

Till

[685 byte] By [Rantanplana] at [2007-10-2 15:48:17]
# 1
make invalidate() on component you would like to be resized and then validate() the root.(or revalidate() the root)look for other posts with validate/invalidate/revalidate ;]
poldwusmokowa at 2007-7-13 15:49:55 > top of Java-index,Desktop,Core GUI APIs...