问题描述:

I have seen this effect for a list in my Netbeans. Can somebody tell me what this effect is called and how I can implement it in my custom ListCellRenderer?

Thanks for your help.

Andy

网友答案:

The closest thing you can do is use a "tooltip". This is done by:

  1. invoking the setToolTipText() method in you renderer, or
  2. overriding the getToolTipText() method of the JList.

Normally the tool tip appears below the mouse location. You can also override the getToolTipLocation() method to position the tool tip over the current row to more closely mimic the netbeans behaviour.

相关阅读:
Top