Hello Someone know how to print number with JFrame. | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

Hello Someone know how to print number with JFrame.

I trying drawString but it didn't work because it only draw a string, someone can help???

14th May 2021, 4:34 PM
Michal
Michal - avatar
1 Answer
+ 2
It looks like you are trying to print directly on your JFrame. I don't know if it is possible but normally you don't do this. You can imagine the JFrame as your window of your program. And inside your window you add containers, areas, buttons or whatever you need. For printing numbers a textarea could be helpful: https://www.javatpoint.com/java-jtextarea I hope this helps you.
14th May 2021, 6:06 PM
Denise Roßberg
Denise Roßberg - avatar