Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
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: 2173
    
  47
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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JSCROLLPANE and JTEXTAREA Problems
 
Similar Threads
The textarea is not getting value
Errors with array and JTextArea and ComboBox
How to add two buttons in each row?
Query on ProgressBar(Help plz)
ActionListener problem