• Post Reply Bookmark Topic Watch Topic
  • New Topic

to fix scrollpane in JTextArea  RSS feed

 
kiran manohar
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,
i m new to java.in the JTextArea the scrollbars are not coming on default like in awt.how do i get the scrollbars in JTextArea?
regards
Kiranmanohar
 
Jose Botella
Ranch Hand
Posts: 2120
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Add the JTextArea to a JScrollPane like this:
new JScrollPane(myTextAre);
The scroll bars are created as needed. See the API
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!