Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

JScrollPane problem  RSS feed

 
Stephen ODonnell
Greenhorn
Posts: 19
  • 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
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
can you post createJScrollPane()
 
Stephen ODonnell
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Here it is:
 
Stephen ODonnell
Greenhorn
Posts: 19
  • 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.
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!