• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

I cannot see the hidden portion of JPanel when adding to JScrollPane then a JTabbedPane

 
Ranch Hand
Posts: 634
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I know I am doing something wrong here. But I don't know how
I want to stack up the charts (JFreeChart) one after the other,
because the charts are big, so that I need it to scroll vertically or horizontally
when the viewport is not large enough.
You may assume GradientPanel is a JPanel with Database support.
Here I cannot scroll and the charts are not moving
Thanks
Jack


JScrollPane.png
[Thumbnail for JScrollPane.png]
 
Rancher
Posts: 3324
32
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

You may assume GradientPanel is a JPanel with Database support.



No, I can't assume that. Maybe the GradientPanel is the cause of the problem.

Here I cannot scroll and the charts are not moving





Never set the preferred size of a component. That is the job of the layout manager. Scrollbars appear when the preferred size of the component added to the scrollpane is greater than the size of the scrollpane.

If you need more help then post a proper SSCCE.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic