Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Array of jpanels within JScrollPane

 
Mandar Khire
Ranch Hand
Posts: 568
Android Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I try to create Array of jpanels within JScrollPane...
I partially done same but instead of JScrollPane i created jpanel....you can see code here.
Here i write simple code for JScrollPane

Now question is i can see both scrollbar but it cant move...
i try to search but not found...
I know its may be silly mistake...
 
Michael Dunn
Ranch Hand
Posts: 4632
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
what's in the viewport has to have a preferredSize set greater than the viewport's size.

change this
//bgp.setSize(new Dimension(364, 96));
to
bgp.setPreferredSize(new Dimension(1000,1000));
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic