1

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 effect

Community
  • 1
  • 1
andyRandy
  • 93
  • 1
  • 3
  • 10
  • 1
    I'm pretty sure NetBeans is written in Java/Swing and is open source. With a little bit of digging, you could probably find what you're looking for. – DannyMo Jun 17 '13 at 15:50

1 Answers1

1

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.

camickr
  • 321,443
  • 19
  • 166
  • 288