Sunday, October 21, 2012

Java program to animated text or moving text


import java.applet.*;
import java.awt.*;
/*<applet code="runtext" width=450 height=400>
</applet>*/

public class runtext extends Applet implements Runnable
 {
   Thread t;
   int x,y;
  boolean stopflag;
            public void init()
             {
               setBackground(Color.black);
               setForeground(Color.white);
               x=120;y=130;
              
             }

            public void start()
              {
                stopflag=false;
                t=new Thread(this,"one");
                t.start();
                       
              }

            public void paint(Graphics g)
              {showStatus("name of college");
                g.drawString("SS College",x,y);
              }

            public void stop()
              {
                stopflag=true;
                t=null;
              }

            public void run()
              {
                for(; ;)
                        {
                          try
                            {
                                    y++;x++;
                                    repaint();
                                    Thread.sleep(50);
                                    if(stopflag) break;
                            }
                         catch(InterruptedException e)
                          {
                                    System.out.println(e);
                          }
                        }
             }
}
Output

11 comments:

  1. Very nice post here and thanks for it .I always like and such a super contents of these post.Excellent and very cool idea and great content of different kinds of the valuable information's.
    rpa training in bangalore
    best rpa training in bangalore
    rpa training in pune | rpa course in bangalore
    rpa training in chennai

    ReplyDelete
  2. Nice & Informative Blog !
    QuickBooks is an easy-to-use accounting software that helps you manage all the operations of businesses. In case you want immediate help for QuickBooks issues, call us on QuickBooks Customer Support Number 1-(855)-738-7873.

    ReplyDelete
  3. Java Program To Animated Text Or Moving Text ~ Techietopics >>>>> Download Now

    >>>>> Download Full

    Java Program To Animated Text Or Moving Text ~ Techietopics >>>>> Download LINK

    >>>>> Download Now

    Java Program To Animated Text Or Moving Text ~ Techietopics >>>>> Download Full

    >>>>> Download LINK

    ReplyDelete
  4. Java Program To Animated Text Or Moving Text ~ Techietopics >>>>> Download Now

    >>>>> Download Full

    Java Program To Animated Text Or Moving Text ~ Techietopics >>>>> Download LINK

    >>>>> Download Now

    Java Program To Animated Text Or Moving Text ~ Techietopics >>>>> Download Full

    >>>>> Download LINK Fj

    ReplyDelete
  5. Thank you for sharing this blog with some interesting topic keep doing this work also check out this Best CBSE School in Faridabad

    ReplyDelete
  6. Prodot provides reliable laptop adapter online. Our adapters are built to provide the perfect voltage and ampere requirements for your laptop, ensuring optimal performance and longevity. Choose Prodot for high-quality and dependable laptop adapters that meet all your power supply needs.

    ReplyDelete
  7. 花蓮租車三天兩夜怎麼分區?以北側近郊、市區海岸與南向縱谷安排每日主線,並為還車與回程保留可縮短的最後半天。
    花蓮租車

    ReplyDelete
  8. 沒有開車怎麼選花蓮民宿?從火車站步行、轉運站、公車班次、晚餐與行李動線判斷,比只看景點距離更實用。

    花蓮民宿

    ReplyDelete