I’ve trying to create a JToolTip over a JPanel. The idea is, that user move over the JPanel (mouseMove) and behind the cursor will be the tooltip. But I dont know, how to set up tooltip to JPanel. I mean, that I create instance of JToolTip, setLocation by cursor (in mouseMove) and then I don’t know how to set up this new tooltip to panel (like JPanel.setToolTip(newJToolTip)).
I’ve trying to create a JToolTip over a JPanel . The idea is, that
Share
You can set a tooltip on a
JPanelusingsetToolTipText(). When the mouse cursor stops, the tooltip is displayed. If you no longer need this behavior, just call the method again withnullas a parameter.