• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

swings

 
Greg Walker
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When dumping stuff into a text area how do you set up the side scroll bar so you can move up and down the text area to view info?
 
Deepak Bala
Bartender
Posts: 6663
5
Firefox Browser Linux MyEclipse IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Instantiate the scrollPane and add it to the textarea. Now add this scrollpane to your JPanel.

The link shows you how.

http://java.sun.com/docs/books/tutorial/uiswing/components/scrollpane.html
 
Gregg Bolinger
GenRocket Founder
Ranch Hand
Posts: 15302
6
Chrome IntelliJ IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by John Meyers:
Instantiate the scrollPane and add it to the textarea.


Technically, you add the JTextArea as a child of the JScrollPane.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic