Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JSCROLLPANE and JTEXTAREA Problems

 
Pedro Neves
Ranch Hand
Posts: 64
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello. I'm experiencing some problems with JScrollPane and TextAreas. Can somebody help me?

I have this




If i do this



Nothing appears on the ScrollBar1 (that actualy is a JScrollPane).

Please help me.


Kind regards
 
Tony Docherty
Bartender
Posts: 2957
59
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why are you calling setLayout(null) and setVisible(true) on all the components and in some cases twice?

JScrollPane is a collection of other components and whilst I haven't looked at the internals to see how it works I suspect it uses a layout manger to layout these components.
 
Pedro Neves
Ranch Hand
Posts: 64
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Tony Docherty wrote:Why are you calling setLayout(null) and setVisible(true) on all the components and in some cases twice?

JScrollPane is a collection of other components and whilst I haven't looked at the internals to see how it works I suspect it uses a layout manger to layout these components.



You were right.. it was that ;) thanks a lot
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic