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
  generating electricity using rotating door in ppt Guest 1 262 18-11-2017 11:02 AM
Last Post: jaseela123
Sad hide image inside another image using java source code Guest 1 208 18-11-2017 10:10 AM
Last Post: jaseela123
  interfacing lcd with 8255 using 8086 Guest 1 0 17-11-2017 01:07 PM
Last Post: jaseela123
  washing machine control using microprocessor 8086 Guest 1 0 07-11-2017 09:42 AM
Last Post: jaseela123
  PRE-PAID POWER CONSUPTION USING COIN BOX REPORT seminar flower 1 899 27-10-2017 01:01 PM
Last Post: nagaland 8pm today
  Electronics Letter Box Using IC 555 seminar tips 2 2,823 26-10-2017 02:37 PM
Last Post: jaseela123
  unrestricted simplex protocol in computer network in c program Guest 1 0 25-10-2017 04:25 PM
Last Post: jaseela123
  Industrial Conveyor System Using Magnetic Levitation system seminar code 2 251 25-10-2017 12:03 PM
Last Post: jaseela123
  detection of glaucoma using image processing techniques Guest 1 0 25-10-2017 11:53 AM
Last Post: jaseela123
Shocked ambulance rescue system using gps and gsm Guest 1 255 14-10-2017 03:25 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: