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

JScrollPane Problem  RSS feed

 
Rashid Ali
Ranch Hand
Posts: 349
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have added JScrollPane in my jtextarea.
But the problem is this that its mode does not remain always means when it open some file and its length goes over than the textarea then the JScrollPane bars appears otherwise they remain hide.
Is there any way that i can keep these both bar permanently in my application. An example shall highly be appreciated.
Thanks for your time and suggestion.
Kind regards
Rashid Ali
 
Paul Stevens
Ranch Hand
Posts: 2823
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try
new JScrollPane(yourTextArea, JScrollPane.VERTICAL_SCROLLBAR_ALWAYS, JScrollPane.HORIZONTAL_SCROLLBAR_ALWAYS);
 
Rashid Ali
Ranch Hand
Posts: 349
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you very very much sir for your help.
Kind regards
Rashid Ali
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!