Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / GUI / May 2004

Tip: Looking for answers? Try searching our database.

JScrollBar / JScrollPane question

Thread view: 
shawno - 07 May 2004 14:46 GMT
Hi,

I've got a little app with a JTextArea inside of a JScrollPane that
displays rows of results.  When the user searches for something one of
the options is to hilite the entire row that contains the search text.
The problem with this is if the data in the row goes past the
viewable textarea, the scrollpane automatically scrolls to the end of
the hilited row.  After hiliting the text, if I set the caret position
back to where I want it the hiliting is obviously lost.
So, is there a way I can 1) get the horizontal scrollbar to not scroll
when the row of text is selected, or 2) get the horizontal scrollbar
to just scroll to the beginning of the row without losing the
hiliting?

I am relatively new to java gui so there may be an easier way to do
this.  Thanks.
Andrew Thompson - 07 May 2004 14:54 GMT
> After hiliting the text, if I set the caret position
> back to where I want it the hiliting is obviously lost.

Select it backwards?

Signature

Andrew Thompson
http://www.PhySci.org/ Open-source software suite
http://www.PhySci.org/codes/ Web & IT Help
http://www.1point1C.org/ Science & Technology



Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.