在JTable中的单元格上方显示工具提示 [英] Show a tooltip above a cell in a JTable

查看:81
本文介绍了在JTable中的单元格上方显示工具提示的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当用户在单元格中输入错误值时,我需要在单元格上方(或下方)显示工具提示(请参见下图). 我有一个工具提示,但是我需要一个Point才能将其显示在正确的位置,因此我想获得一个单元格的位置.你知道如何得到这个吗?

I need to show a tooltip above (or below :) a cell when the user enter a wrong value in it (see the image below). I have a tooltip, but I need a Point to display it at the right position, so I want to get a cell position. Do you know how to get this?

但是,如果您有更好的解决方案来实现此功能,那么我愿意接受所有主张(特别是因为工具提示未与单元格/Jtable/Panel绑定,并且如果我移动/关闭/最小化了我的提示,窗口,工具提示显示在同一位置)

BUT, if you have a better solution to realize this behaviour, I'm open to all proposition (especially for the fact that the tooltip is not bind with the cell/Jtable/Panel and if I move/close/minmize my window the tooltip is display at the same position)

谢谢, 达米安(Damien)

Thanks, Damien

推荐答案

尝试 查看全文

登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆