Win a copy of Modern JavaScript for the Impatient this week in the Server-Side JavaScript and NodeJS forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

Scrollbar in textarea of a panel dissappears

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have created a tabbed pane app that works great for what I need except for one major issue. I have copied the snippet code below. It seems when I select the file to be displayed it pasted in the textarea but no scrollbars are added and I can't see all of the data. I thought by creating a Panel and adding that to the tabbed pane I wold be fine. Then in the created panel I would create a textarea and add scrollbars to it. Alas no work. Any help is appreciated.


 
Ranch Hand
Posts: 15304
6
Mac OS X IntelliJ IDE Chrome
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No scrollbars are added because you never created a JScrollPane object for the JTextArea.

 
Raymond Brown
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the tip and your suggestion of course worked. I realized my ignorance of the complete understanding of the code I was using. I thought the eText.setAutoScroll(true); would do the same thing but realized that method is for JComponets and not for the manner I was using it in.

Thanks for the help and showing me the right way as well as for helping me learn the api better.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
    Bookmark Topic Watch Topic
  • New Topic