As I wrote in title,
I want to drawLine additionally when Timer generates events.
Line will be draw like
first time;
ㅡ
second time;
ㅡ
ㅡ
- I want line will be added on before’s maintained situation
- If first purpose cannot be done, (because I’m not good at Java yet, that’s just my idea) I want to draw N line in Nth events then i redraw new N+1 line in (N+1)th events.
Which could be done in Java?
P.S. How to stop the Swing Timer?
You’ll basically have to (not in order):
paintComponentmethod in a component to draw the lines, based on the incrementing counterrepaint()on your component (will happen on each timer tick)Work on each one of those tasks individually, and when you feel you’ve mastered each one, you can try putting them all together.