• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Liutauras Vilda
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

Scroll dissapears when resizing window without showing the whole content

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?







 
Bartender
Posts: 1104
10
Netbeans IDE Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Create symphonies in seed and soil. For this tiny ad:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic