File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Swing / AWT / SWT and the fly likes Scrollbar in textarea of a panel dissappears Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Scrollbar in textarea of a panel dissappears" Watch "Scrollbar in textarea of a panel dissappears" New topic
Author

Scrollbar in textarea of a panel dissappears

Raymond Brown
Greenhorn

Joined: Jun 15, 2004
Posts: 5
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.


Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15292
    
    6

No scrollbars are added because you never created a JScrollPane object for the JTextArea.



GenRocket - Experts at Building Test Data
Raymond Brown
Greenhorn

Joined: Jun 15, 2004
Posts: 5
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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Scrollbar in textarea of a panel dissappears
 
Similar Threads
carriage ret & linefeed
How to add two buttons in each row?
JProgressBar shows no progress
JFileChooser: Selecting multiple files error
Files.copy() command is not working