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
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://project-seminars.com/Thread-progr...#pid243259

http://project-seminars.com/Thread-progr...ing-applet
 

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
  matlab code for speech compression using dwt Guest 0 0 26-06-2017 06:14 PM
Last Post: Guest
  steganography using dwt matlab code Guest 0 0 25-06-2017 03:49 PM
Last Post: Guest
  download leaky bucket implementation using opengl Guest 0 0 25-06-2017 11:28 AM
Last Post: Guest
Thumbs Up pic16f73 led blink program Guest 0 0 24-06-2017 11:05 PM
Last Post: Guest
Rainbow Multi Banking Project using .net Suvendu1986 5 4,936 24-06-2017 07:43 PM
Last Post: Guest
  documentation of mobile cell phone charger using ic 555 download in pdf Guest 0 0 23-06-2017 11:48 PM
Last Post: Guest
  concealed weapon detection using image processing ppt Guest 0 0 21-06-2017 06:54 PM
Last Post: Guest
  block diagram mobile cell phone charger using ic 555 ppt Guest 2 1,201 21-06-2017 04:03 PM
Last Post: Guest
  gas leakage detection using gsm full ppt free download Guest 0 0 19-06-2017 09:41 AM
Last Post: Guest
  automatic night lamp with morning alarm using 8086 assembly language program Guest 0 0 15-06-2017 11:39 AM
Last Post: Guest
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: