Dar*_*ght 3 java swing jtree mouseevent swingutilities
我想搜索JTree的特定节点并确定其在屏幕上的位置。我的目标是从该节点的左上角开始悬停鼠标,然后在我的JFC中单击鼠标。
谁能帮我这个?可能吗?
Ing*_*gel 5
知道x和y坐标(通过鼠标事件),您可以通过获得路径JTree.getPathForLocation。节点的边界由返回JTree.getPathBounds(path)。
JTree.getPathForLocation
JTree.getPathBounds(path)
归档时间:
13 年,2 月 前
查看次数:
3411 次
最近记录:
12 年,1 月 前