javaswingjframejung2

how to insert settooltiptext for one vertex in a graph?


I would like to move the mouse over an vertex which was plotted on a JFrame using JUng class and displaying some additional message for that vertex. But I don't know how to set setToolTipText for a vertex. Is there any way? please help me with this


Solution

  • You can add the following command to insert setToolTipbox to your graph

    vv.setToolTipText("<html><center>Breast Neoplasms<p>"
                + "Gene interactions</p> </center></html>");