Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / GUI / November 2003

Tip: Looking for answers? Try searching our database.

Misbehaviour of scrollbars in JScrollPane

Thread view: 
Rene Ruppert - 26 Nov 2003 12:09 GMT
Hi,

I add 500 JPanels to a JScrollPane which is equipped with a FlowLayout
Manager (i.e. this is some kind of thumb view with a vertical scrollbar
only). The scrollbar is adjusted accordingly to the extent of the
scrollpane.
Now I remove the 500 panels and insert them again. What happens is, that now
the drag button of the scrollbar is only half as high as it was before and
the size of the viewport is twice as big as before. When repeating this
step, the view port keeps growing and the scrollbar drag button keeps
shrinking.

What is the correct way to reset the view/scrollpane/scrollbar?

Thanks.

cu

Rene
Rene Ruppert - 27 Nov 2003 15:16 GMT
I added the components by using: this.add() and removed them by calling
myScrollPane.remove() - i.e. they were never removed since they were added
to a completely different component. :-)
ak - 27 Nov 2003 18:41 GMT
Ok now I see that your question was wrong.
I was really wondering how can some one add 500 panels to JScrollPane ;-)

--

____________

http://reader.imagero.com the best java image reader.

> I added the components by using: this.add() and removed them by calling
> myScrollPane.remove() - i.e. they were never removed since they were added
> to a completely different component. :-)


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.