aspose file tools*
The moose likes Swing / AWT / SWT and the fly likes Array of jpanels within JScrollPane Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Array of jpanels within JScrollPane" Watch "Array of jpanels within JScrollPane" New topic
Author

Array of jpanels within JScrollPane

Mandar Khire
Ranch Hand

Joined: Sep 11, 2007
Posts: 485
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...


Millions saw the apple fall, but Newton asked why.
If you understand, say "understand". If you don't understand, say "don't understand". But if you understand and say "don't understand". How do I understand that you understand? Understand!
Michael Dunn
Ranch Hand

Joined: Jun 09, 2003
Posts: 4632
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));
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Array of jpanels within JScrollPane
 
Similar Threads
I'm sure I'm doing something very dumb.... why can't I see my JLabel?
Problem in jdbc with swing (old wine in new bottle)
ideas wanted on making this custom JTable cell renderer more efficient
Swing: Unable to bring down the size of JPanel
3 questions regarding JPanel.