Answers for "how to make a typewriter effect in jaca"

0

how to make a typewriter effect in jaca

String text = "hello world";
int i;
for(i = 1; i <= text.length(); i++){
    g.drawString(text.subString(0, i), x, y);//Where g is your Graphics object and x and y are the coordinates you want to draw at
    try{
        Thread.sleep(500);//0.5s pause between characters
    }catch(InterruptedException ex){
        Thread.currentThread().interrupt();
    }
}
Posted by: Guest on October-25-2021

Code answers related to "how to make a typewriter effect in jaca"

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language