Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package GUIs;
- import java.awt.Graphics;
- public class DialogManager {
- public static void typeWriter(String message, long millisPerChar, int x, int y,Graphics g){
- for(int i=0;i<message.length();i++){
- g.drawString(message.substring(i,i+1), x, y);
- try {
- Thread.sleep(millisPerChar);
- } catch (InterruptedException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement