• Post Reply Bookmark Topic Watch Topic
  • New Topic

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

 
Jacky Luk
Ranch Hand
Posts: 634
  • Mark post as helpful
  • send pies
  • 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]
 
Rob Camick
Ranch Hand
Posts: 2756
12
  • Mark post as helpful
  • send pies
  • 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.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!