This week's giveaway is in the Spring forum.
We're giving away four copies of REST with Spring (video course) and have Eugen Paraschiv on-line!
See this thread for details.
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes Collapsing JScrollPane? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "Collapsing JScrollPane?" Watch "Collapsing JScrollPane?" New topic

Collapsing JScrollPane?

Amund Frislie

Joined: Jan 25, 2002
Posts: 17
I have build up my gui using gridbag layout. On the top row, there are 3 panels (search, message and booking). On the row below, spanning all columns, there's a JScrollPane. Problem is, if the scroll pane is filled and the message panel is updated with some new text, this makes the whole scroll pane collapse. I've tried to put the scroll pane inside another JPanel, but without success. Anyone experienced this? Any suggestions on how to aviod it?
Mathew Sam
Ranch Hand

Joined: Dec 19, 2001
Posts: 124
Don't know whether this will solve your problem.
But just a thought. Have message panel on a scrollpane.
Amund Frislie

Joined: Jan 25, 2002
Posts: 17
Good idea. It works now. Thanks Mathew.
I agree. Here's the link:
subject: Collapsing JScrollPane?
It's not a secret anymore!