• Post Reply Bookmark Topic Watch Topic
  • New Topic

Not getting JViewport to work  RSS feed

 
Erik Evertsen
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I try to use JViewport and JScrollPane to scroll throw the String that is drawn, but no scrollbars are appearing. Who can help me with this problem?





The Strings are drawn normaly, but long Strings are drawn partly out of sight, there for I need a JViewPort, so I can scroll throw the Strings.
[ November 16, 2006: Message edited by: Erik Evertsen ]
 
Darrin Cartwright
Ranch Hand
Posts: 107
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Howdy Erik!

I'm not sure I understand your question, (and that's way too much code to read) but this might help:

If nothing is showing up in the JScrollPane, you need to set the component you want to show in the scroll pane as the view, such as:
JScrollPane.setViewportView(YourTextArea);

Hope that helps!

Darrin
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!