Win a copy of Svelte and Sapper in Action this week in the JavaScript 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 ...
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

Which JScrollPane ?

Ranch Hand
Posts: 342
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a problem with scroll panes. In my app I have a JFrame that is split vertically into 2 panels using JSplitPane. The two panels added to either side of the split pane are JScrollPanes, because when the split pane bar is moved, or the frame is re-sized, i need both panels to scroll so the user can see all the contents of each side. Fine...but...
In the right hand pane of the split pane I have another panel within the scroll pane containing a JTextArea. This panel also needs to scroll to accommodate input into this text area without changing the size of the displayed text area. It all works fine while I'm typing into the text area - but when the text area looses focus, the scrollbars disappear from the text area's panel and the main scrolling pane for the whole of the right hand side of the frame scrolls instead (i.e. my text area becomes as big as the text it contains, but the main panel it's in scrolls so you can see it all - NOT desirable!). Any ideas on how I can prevent this sort of behaviour anyone?
Ranch Hand
Posts: 148
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
could u pls post the code also?
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
    Bookmark Topic Watch Topic
  • New Topic