Attached you will find custom classes for handling tooltip.
(See attached file: ToolTip.java)(See attached file: ToolTipGenerator.java)
(See attached file: ToolTipTrigger.java)
Note: It is important that main window of type Frame hosts the tooltip
(shown below as "frame").
If you have a better solution, please pass it on.
Sample usage:
public class MyClass implements ToolTipTrigger {
Frame frame;
Canvas3D canvas3D;
public MyClass() {
canvas3D.addMouseMotionListener( new ToolTipGenerator(this, 500) );
}
public void startToolTip( Point pt ) {
ToolTip tip = new ToolTip( tipText );
tip.show( frame, pt.getX(), pt.getY() );
}
}
Kovalan
ToolTip.java
ToolTipGenerator.java
ToolTipTrigger.java