The problem is, how to make simplier and more effective.
I’m using jfreechart, and I want to draw a line from one point to another by clicking a mouse.
I have overrided chartMouseClicked to set start point and, after next click end point of line.
It works. But want to see my line, with beginning on start point, and the end on mouse cursor, while, after first click, I’m moving cursor. I’ve done it by setting dataset and setting renderer in my overrided chartMouseMoved method, but it is creating many datasets after every move of cursor. My question is how to make visible preview of the line which I’m making by 2xclick of mouse.
Can anybody help me?
The problem is, how to make simplier and more effective. I’m using jfreechart, and
Share
Let jFreechart render into an off-screen image and use that image to draw your widget’s background. Then, you don’t need to worry about jFreechart’s internals and event handling; you can use the standard Swing/AWT approach to create a simple vector graphics editor.