Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Scroll dissapears when resizing window without showing the whole content  RSS feed

 
Rafi Benjamin
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi!

I have a problem with a scrollbar. I have searched for solutions but without any progress.
The problem is that I'm using a paintcomponent in a panel. The "paintcomponent" exceeds the size of the screen so I added a scroll, but the scroll disappear when i resize the window and I'm not able to see the whole content.
Could someone please help me? What am I doing wrong?







 
Ranganathan Kaliyur Mannar
Bartender
Posts: 1103
10
Java Netbeans IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Rafi,
Welcome to the Ranch!

The problem is with the preferredSize set for the panel. Scrollbar works based on this. So, you have to set the preferred size in such a way to show the content. For example, when I set a preferred width of 2000 or so, I am able to see the full content.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!