File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Array of jpanels within JScrollPane

 
Mandar Khire
Ranch Hand
Posts: 565
Android Java Linux
  • 0
  • 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
  • 0
  • 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));
 
Don't get me started about those stupid light bulbs.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic