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 / General / December 2007

Tip: Looking for answers? Try searching our database.

Tricky JTable question

Thread view: 
H.L - 05 Dec 2007 19:40 GMT
Assume that I have an individual cell inside a JTable with a multi-line
string. When a mouse double click or click is recorded, I would like to
know not only what cell was clicked (fairly easy with the rowatPoint and
columnatpoint routines), but also which of the rows inside the cell was
clicked. How can I do that? It does seem rather tricky and it is hard to
see how it should be set up. Thanks in advance.

Regards.
Roedy Green - 06 Dec 2007 09:47 GMT
>Assume that I have an individual cell inside a JTable with a multi-line
>string. When a mouse double click or click is recorded, I would like to
>know not only what cell was clicked (fairly easy with the rowatPoint and
>columnatpoint routines), but also which of the rows inside the cell was
>clicked. How can I do that? It does seem rather tricky and it is hard to
>see how it should be set up. Thanks in advance.

Does the event give you x,y?  What are they relative too?  If you know
the line height, divide.
Signature

Roedy Green Canadian Mind Products
The Java Glossary
http://mindprod.com

H.L - 07 Dec 2007 20:13 GMT
> Assume that I have an individual cell inside a JTable with a multi-line
> string. When a mouse double click or click is recorded, I would like to
[quoted text clipped - 4 lines]
>
>  Regards.

Thanks to mr. Roedy Green for the tip that you gave!! I searched a bit
and found that JList is probably a better option for what I want to do.
I lost his post in the list of threads.

Regards.


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



©2008 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.