Skip to Main Content

Java SE (Java Platform, Standard Edition)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Distinguish click on a table's cell versus its header

Mat MortonNov 8 2011 — edited Nov 11 2011
I'm using a TableView where I'd added a a handler on mouse clicked to take some action. I've been using the focus model to determine which cell was clicked on. This works fine, except when the click is on the table's header (say to resize the column). The mouse click still occurs but the focused cell has not changed so the click is mistakenly treated as one on the table.

Besides relying on getFocusModel or getSelectionModel, is there a better way to determine which cell is actually under the mouse click?
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 9 2011
Added on Nov 8 2011
5 comments
144 views