JTable/JXTable tooltips

I’m trying to tooltips in the header (or even cells) of a JTable…I happen to be using a JXTable right now though I’m told that the differences are minor when using the basic functionality. At any rate, I’m tying to make graphical tooltips in the header and not just standard tooltips so I’m using the Swing Hacks example of creating a CustomToolTip where I override the paintComponent method to draw my tooltip. Currently I’m also creating a CustomJButton to use the Custom tool tip and I insert the CustomJButton in the header and also another button outside of the table for testing. The button inside the header is inserted there through my own table renderer but for some reason the tooltips paintComponent is not called on it and so the “regular” tooltip appears, but when you mouse over the button at the bottom (outside of the JXTable) the custom tooltip is displayed.

So, my problem is that in the header (and even in the cells) the tooltip method of the component is called but not the paintComponent so is there something I’m doing wrong?

I attached the code…you will need to get the latest swingx jar file from swinglabs to be able to compile this.

I was able to get something working that might be of interest to others…I needed override the createToolTip() method of the JXTableHeader in order to get header tooltips…I’m guessing the same would work for the cell tooltips.

The code is still rough but I’ve attached the latest version for those interested…I’m attaching only the updated files.