Updating text box

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Post Reply
SCPone
Posts: 1
Joined: Tue Jun 09, 2020 6:34 am
antibot: No, of course not.

Updating text box

Post by SCPone » Tue Jun 09, 2020 8:15 am

I made a chart panel with a candlestick plot in it. Although JFreechart does show the ohlc price of each candle when you hover over it, the window is quite small and hard to read. I want to implement a text box on the upper left corner of the plot so that it will display the closest ohlc data when you move your mouse. I already figured out a way to find the closest candle based on my mouse's position using chartMouseListener, but I have no idea how to draw a text box. I tried reading the documentation but I just get confused. Can someone pls show me a simple text box example? Thanks!

P.S. this is kind of how I want the result to look like: Image

Post Reply