This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
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

JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Array of jpanels within JScrollPane" Watch "Array of jpanels within JScrollPane" New topic

Array of jpanels within JScrollPane

Mandar Khire
Ranch Hand

Joined: Sep 11, 2007
Posts: 555

I try to create Array of jpanels within JScrollPane...
I partially done same but instead of JScrollPane i created 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.
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));
bgp.setPreferredSize(new Dimension(1000,1000));
I agree. Here's the link:
subject: Array of jpanels within JScrollPane
It's not a secret anymore!