Object Draw canvas Text
Hello, I'm new to the forums and still pretty new to java. I'm making a program and need to display text (a variable that holds an integer value).
Right now I'm running into a dilemma. Everything works correctly as I have it written, but it does not work the way I want it to. This is generically what I have:
Every time the variable changes, the old and new text just overlap each other. When I add a pause and then hide the text it works (by just showing the latest variable value since the last one is hidden) but I need to do this without a pause as the pause can be an infinite amount of values in this program.
Text text = new Text (variable, 0.0, 0.0, canvas);
Let me know if you need more info or anything, I can assist you helping me find an answer in any way possible. If anything isn't clear enough just let me know.
Thank you very much. Let me know if there is an easier way of doing this or how to just show the latest variable value on the canvas the way I am going about doing it.
P.S. As I said, I'm new to java for the most part, so if you are introducing something that a beginner would find somewhat complicated try your best to explain it. Thank you so much!
I looked around and I saw this. I'm going to say that I would rather stick with Text than 2d graphics since it seems so much simpler, unless you all feel it would be much easier for what I am doing. Just let me know what you think.