Important: Use custom search function to get better results from our thousands of pages

Use " " for compulsory search eg:"electronics seminar" , use -" " for filter something eg: "electronics seminar" -"/tag/" (used for exclude results from tag pages)


 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
PROGRAM TO DISPLAY A MOVING BANNER USING APPLET
Post: #1

Code:
import java.awt.*;
import java.applet.*;
//<applet code=Movingb width=100 height=100></applet>
public class Movingb extends Applet implements Runnable
{
String s="MOVING BANNER";
Thread t=null;
boolean flag;
public void init()
{
setBackground(Color.red);
setForeground(Color.blue);
}
public void start()
{
t=new Thread(this);
flag=false;
t.start();
}
public void run()
{
char ch;
for(; ;)
try
{
repaint();
Thread.sleep(1000);
ch=s.charAt(0);
s=s.substring(1,s.length());
s=s+ch;
if(flag==true)
break;
}
catch(InterruptedException ie)
{
}
}
public void stop()
{
flag=true;
t=null;
}
public void paint(Graphics g)
{
g.drawString(s,200,200);
}
}
OUTPUT

Please Use Search http://projects-seminars.net/search.php wisely To Get More Information About A Seminar Or Project Topic
Post: #2
how that text will scroll by this code, give explanation.
char ch;
for(; Wink
try
{
repaint();
Thread.sleep(1000);
ch=s.charAt(0);
s=s.substring(1,s.length());
s=s+ch;
Post: #3
PROGRAM TO DISPLAY A MOVING BANNER import java.awt.*;
import java.applet.*;

publicclass simpleBanner extends Applet implements Runnable
{
String msg=" A Simple Moving Banner. ";
Thread t=null;
int state;
boolean stopflag;

publicvoid init()
{
setBackground(Color.yellow);
setForeground(Color.red);
}

publicvoid start()
{
t = new Thread(this);
stopflag=false;
t.start();
}

publicvoid run()
{
char ch;
for(;Wink{
try{
repaint();
Thread.sleep(250);
ch=msg.charAt(0);
msg=msg.substring(1,msg.length());
msg=msg+ch;
if(stopflag)
break;
}catch(InterruptedException e) {}
}
}

publicvoid stop()
{
stopflag=true;
t=null;
}

publicvoid paint(Graphics g)
{
g.drawString(msg,50,30);
showStatus("Simple Banner");
}

}USING APPLET

http://projects-seminars.net/Thread-prog...#pid243259

http://projects-seminars.net/Thread-prog...ing-applet
 


[-]
Quick Reply
Message
Type your reply to this message here.

Image Verification
Image Verification
(case insensitive)
Please enter the text within the image on the left in to the text box below. This process is used to prevent automated posts.
Marked Categories : moving banner using applet, moving banner applet program, moving string in java using applet, applet to display moving banner, moving an image using applet, applet programming for banner, moving banner applet program java, java application to display moving banner, move a string using applet, program in java to display banner in applet, send info banner program, moving banner applet, code for moving banner applet, moving banner program in java, moving an image program using applet, code for image moving banner in applet, banner applet program, program for moving banner in java applet, code for banner using applet, program code for banner in applet with output,

[-]
Quick Reply
Message
Type your reply to this message here.

Image Verification
Image Verification
(case insensitive)
Please enter the text within the image on the left in to the text box below. This process is used to prevent automated posts.

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  electricity genration foot step using rack and pinion Guest 0 0 Yesterday 07:12 PM
Last Post: Guest
  listening bug using 741 by multisim Guest 0 0 Yesterday 04:12 PM
Last Post: Guest
  large scale power generation using fuel cell ppt and document and abstract Guest 1 0 Yesterday 09:57 AM
Last Post: jaseela123
  thesis on power quality improvement by using statcom Guest 1 0 Yesterday 09:09 AM
Last Post: jaseela123
  patient fall detection using hip and abdomen sensors Guest 1 0 24-03-2017 09:36 AM
Last Post: jaseela123
  child tracking system using android phones srs ppt Guest 1 0 24-03-2017 09:25 AM
Last Post: jaseela123
  concealed weapon detection using digital image processing ppt Guest 1 0 23-03-2017 10:08 AM
Last Post: jaseela123
  ppt on electrical power generation system using railway track slides Guest 1 0 22-03-2017 04:09 PM
Last Post: jaseela123
  aqua communication using modem ppt download Guest 1 0 22-03-2017 03:41 PM
Last Post: jaseela123
  matlab source code for image compression using dct Guest 1 0 21-03-2017 01:06 PM
Last Post: jaseela123
This Page May Contain What is PROGRAM TO DISPLAY A MOVING BANNER USING APPLET And Latest Information/News About PROGRAM TO DISPLAY A MOVING BANNER USING APPLET,If Not ...Use Search to get more info about PROGRAM TO DISPLAY A MOVING BANNER USING APPLET Or Ask Here

Options: