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 Which JScrollPane ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Which JScrollPane ?" Watch "Which JScrollPane ?" New topic
Author

Which JScrollPane ?

Ben Wood
Ranch Hand

Joined: Aug 14, 2001
Posts: 342
Hello,
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?
thanks,
Ben.


SCJP 1.4, www.gsi3d.org.uk
Vinod Venugopal
Ranch Hand

Joined: Dec 06, 2000
Posts: 148
could u pls post the code also?

- Vinod<br />-------<br />SCJP2
 
Consider Paul's rocket mass heater.
 
subject: Which JScrollPane ?
 
Similar Threads
How to work with a ScrollPane in a SplitPane?
Jsplit pane and scroll pane
Resizing issue using TitledBorder and JRadioButtons
Unevenly laying out a JFrame
Loading and unloading a panel