How to determine the location of a particular cell in JXTreeTable on screen?
Advertisement
Answer
not sure, but merging some information gathered on topic.
- this link shows the way to compute swing component coordinates: Getting coordinates of a component in java
- this link shows, that
JXTreeTable
extendsJTable
:- this link shows the way to retrieve coordinates of cell inJTable
: http://www.java-forums.org/awt-swing/23061-jtable-cell-coordinates.html
So final solution could theoretically just calling method (from JTable API
):
public Rectangle getCellRect(int row, int column, boolean includeSpacing)
And if needed then using SwingUtilities.convertRectangle
get the exact screen placement.
Honestly, I’d be quite curious if it works if you give it a try 🙂