• Post Reply Bookmark Topic Watch Topic
  • New Topic

scroll pane

 
Pranav Sharma
Ranch Hand
Posts: 258
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi all
trying to add a scroll pane to my jframe. this is my code in the main.

i then have a paint() method.
Where do i add the scroll pane. what i cant understand is what do i add in the scroll pane. so that i can add it to the container.(this is as far as i understand abt scroll pane).enlighten me please
thank u
 
Joe Ess
Bartender
Posts: 9361
11
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You place a component that implements the javax.swing.Scrollable interface into the JScrollPane, then you place the JScrollPane into the container, for example, here I'm adding a scrollable JTextArea to a JFrame:
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!