Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

auto scrolling in a frame window  RSS feed

 
montu singh
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm using jdk 1.2. Can you pls send me the code to add automatic scrolling to a Frame window? Passing Frame as argument to ScrollPane's addImpl() method gives runtime error saying that frames can't be added to Scrollpane. Thank you.
 
Joe Ess
Bartender
Posts: 9425
12
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
To make the contents of a JFrame scrollable, you add the contents to the Scroll pane and the Scroll Pane to the JFrame. Check out the Java Tutorial on How to Use Scroll Panes.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!