I am using the swing API for my application.
I am trying to implement my own ToolTip manager for a Canvas. I got
everything to work except
the location where the ToolTip is displayed on the screen.
I am using an InternalFrame with a JComponent for my canvas in it !
When the Internalframe does not have a menubar the location where the
tooltip is displayed is correct, with a menubar, the tooltip is
displayed at the wrong location ?
Here is the code :
(invoker is the canvas, this code is taken from JToolTipManager)
public class JPopup
extends JPanel
{
�.
public void show(JComponent invoker, int x, int y)
{
Point p = new Point(x,y);
SwingUtility.convertPoint(invoker, p, invoker.getRootPane());
this.setBounds(p.x, p.y. this.getSize().width,
this.getSize().height());
invoker.getRootPane().getLayeredPane().add(this,
JLayeredPane.POPUP_LAYER,0);
}
}
Does somebody have an idea what's going on ?
Thanks
Chris