Search
 
SCRIPT & CODE EXAMPLE
 

JAVA

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();
    }
}
Comment

PREVIOUS NEXT
Code Example
Java :: Write a java program to print the ip address 
Java :: Java Catching base and child exception classes 
Java :: cancel block event spigot 
Java :: java two constructors 
Java :: randpm years java 
Java :: wrap text in jscrollpane 
Java :: action performed java swing code 
Java :: Caused by: java.lang.IllegalStateException: stream has already been operated upon or closed 
Java :: function name in java 
Java :: bebra 
Java :: java kommazahl abschneiden 
Java :: string expression execution for java 
Java :: sartt timer of 40 second when send otp andrpid 
Java :: Why String is popular HashMap key in Java? 
Java :: jframe open another frame using button actionlistener 
Java :: combine .proto in android studio project 
Java :: java equivalent of pythons getattr 
Java :: java combine to byte[] 
Java :: what is serialization in rest assured 
Java :: alternatives jdk1.8 rhel6 
Java :: vec add to text field java 
Java :: how to get latest artifact from nexus and deployed in tomcat 
Java :: java list to collections 
Java :: android studio setMargin 
Java :: java var keyword with example 
Java :: this java 
Java :: RecyclerView scrolled UP/DOWN listener 
Java :: nikita kaksharov 
Java :: quitar letras repetidas de una palabra en java 
Java :: what is the process of mvvm in android 
ADD CONTENT
Topic
Content
Source link
Name
1+8 =