简体   繁体   中英

Java: JList rendering effect

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

JList效果

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM