title: Add tooltips to a TextAnnotation in JFreeChart?
body: <p><a href="https://i.stack.imgur.com/q5zC9.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/q5zC9.png" alt="enter image description here"></a></p>
  
  <p>How would I add tooltips to a TextAnnotation on a JFreeChart barchart?</p>
  
  <p>Specifically, I want to add a tooltip to a CategoryTextAnnotation:</p>
  
  <pre><code>CategoryTextAnnotation a = new CategoryTextAnnotation("long piece of text...", x-coordinate, y-coordinate);
  </code></pre>
  
  <p>To prevent a long annotation from taking up too much space on the graph, I am limiting the amount of characters that can be shown. However, I want to be able to see the full annotation in a tooltip by hovering over the shortened annotation text. As in the example picture, I want to hover my cursor over "long piece of text..." and have a tooltip show up.</p>