如何在屏幕上确定特定单元格在JXTreeTable中的位置?
发布于 2012-08-24 02:32:01
不确定,但合并了一些关于主题的信息。
此链接显示了计算swing组件坐标的方法:Getting coordinates of a component in java
JXTreeTable扩展了JTable:-此链接显示了在JTable中检索单元格坐标的方法:http://www.java-forums.org/awt-swing/23061-jtable-cell-coordinates.html因此,理论上最终的解决方案可以只调用方法(从JTable API):
public Rectangle getCellRect(int row, int column, boolean includeSpacing)如果需要,则使用SwingUtilities.convertRectangle获得准确的屏幕位置。
老实说,如果你试一试,我会很好奇它是否有效:)
https://stackoverflow.com/questions/12097619
复制相似问题