Skip to content
Advertisement

Make a typewriter effect in a jlabel

This is my JPanel which I’m adding in a JFrame, but the code that write letter per letter but when executed freezes and sometime later, the text appears, the text is not writing with that effect, but I think it should be working, why?

JavaScript

when the program run and i press the buttom to run the type writter eefect, the program got freeze and sometime later the text appears

Advertisement

Answer

The following is mre (1) of what you are trying to achieve, using a swing Timer:

JavaScript

(1) Always consider posting an MRE when asking and answering.
User contributions licensed under: CC BY-SA
5 People found this is helpful
Advertisement