如何获得JTextComponent中第7个字符(例如)的位置(像素)?
发布于 2015-09-08 01:03:27
Rectangle rectangle = textComponent.modelToView( 7 );
从矩形中可以得到x/y的位置。
https://stackoverflow.com/questions/32447781
相似问题