Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

no scroll bars in JTextArea  RSS feed

 
kumar mars
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hai
i have a web page with swing applet in it
the applet has a JTextArea which has to display the text.
Even if the size of the text is more than the size of text area the scroll bars are not coming up
should i set any paremeters to get the scroll bars
please help me
anticipating an early reply
bye
 
Rob Ross
Bartender
Posts: 2205
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You need to add a JScrollPane to your content pane, and add the JTextArea to that, so it is nested within the JScrollPane. Don't add the JTextArea directly to the applet's content pane.
Look up the JTextArea and JScrollPane javadoc, and follow the tutorials there!
Good luck.
 
kumar mars
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank u Ross
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!