aspose file tools*
The moose likes Swing / AWT / SWT and the fly likes JSCROLLPANE and JTEXTAREA Problems Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "JSCROLLPANE and JTEXTAREA Problems" Watch "JSCROLLPANE and JTEXTAREA Problems" New topic
Author

JSCROLLPANE and JTEXTAREA Problems

Pedro Neves
Ranch Hand

Joined: Mar 07, 2012
Posts: 64
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

Joined: Aug 07, 2007
Posts: 2366
    
  50
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

Joined: Mar 07, 2012
Posts: 64
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
 
Consider Paul's rocket mass heater.
 
subject: JSCROLLPANE and JTEXTAREA Problems