This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JScrollPane problem

 
Stephen ODonnell
Greenhorn
Posts: 19
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

I'm trying to set the scrollbar to the top as it is always at the bottom. Nothin I try seems to work!!

I have a JFrame with a container:


I then add my panels


createJScrollPane() returns a JScrollPane containing an outer JPanel inside which there are a number of other panels

I cannot figure out why any of the methods I have tried will not work

Any help greatly appreciated.
Thanks,
Stephen.
 
Michael Dunn
Ranch Hand
Posts: 4632
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
can you post createJScrollPane()
 
Stephen ODonnell
Greenhorn
Posts: 19
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Here it is:
 
Stephen ODonnell
Greenhorn
Posts: 19
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Michael,

Thanks for your help, the problem was a silly one. I was setting the frame visible before I added the JScrollPane
:roll:

Thanks again.
Stephen.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic