Share on Google+Share on Google+

brijesh dhameliya
Write an applet to display scrolling image in an applet window using thread.
1 Answer(s)      4 years ago
Posted in : Applet

Write an applet to display scrolling image in an applet window using thread.

Ads

View Answers

April 4, 2013 at 1:37 AM


import java.awt.*;
import java.applet.*;
import java.awt.event.*;
/*<applet code=imgscrl height=300 width=300></applet>*/
public class imgscrl extends Applet implements Runnable 
{
    Thread t1=new Thread(this);
    Image img;
    int maxx=20,maxy=20;
    public void init() 
    {   
    img=getImage(getDocumentBase(),"Cover.jpg");
    t1.start();
    }
    public void run()
    {
        try
        {
        for(;;)
            {
        maxx+=20;
        if(maxx==1000)
            maxx=20;
        Thread.sleep(500);
        repaint();
        }
        }
        catch(Exception e)
        {
        }
        }
    public void paint(Graphics g)
    {
    g.drawImage(img,maxx,maxy,this);
    }
}









Related Tutorials/Questions & Answers:
Write an applet to display scrolling image in an applet window using thread.
Write an applet to display scrolling image in an applet window using thread.  Write an applet to display scrolling image in an applet window using thread
scrolling text in applet
scrolling text in applet  applet to display the scrolling text. The text should move from right to left. When it reaches to start of the applet border, it should stop moving and restart from the left. When the applet
Advertisements
By using Applet display a circle in a rectangle
By using Applet display a circle in a rectangle  Write a java applet to display a circle in a rectangle
java applet prog
java applet prog  applet to display scrolling text from right to left in an applet window using thread. text should be accepted by html parameter
Display image in the applet
Display image in the applet   ... illustrates you to display image in an applet which has been done in this example... and it's properties have been used to display the image in an applet. In this program only
applet running but no display - Applet
applet running but no display  Hai, Thanks for the post. I have... from a client, the page appears with a blank applet part (just whitescreen..., it is showing that the "Applet as1 started". Please help me to solve this issue
Write an Applet which display current date and time on the web page??
Write an Applet which display current date and time on the web page??  Write an Applet which display current date and time on the web page?  Here is an applet code that display date and time. import java.applet.
Write an Applet which display current date and time on the web page??
Write an Applet which display current date and time on the web page??  Write an Applet which display current date and time on the web page??  Here is an applet code that display date and time. import java.applet.
Applet
Applet  Write an applet to display a string in an applet. String should be passed as a parameter to an applet
applet is running but no display
applet is running but no display  applet is running but no display.. its showing white screen with applet started
Applet
Applet  I have a java applet that has a button. On clicking the button it should disappear and another applet should appear. How to write this code???? Also in login applet after successful login it should display admin applet
Problem with display of images in applets - Applet
, this); } } --------------------------------------- Display image in Java Applet... this program, the appletviewer window is showing no output (i.e. no image). I'm... java.applet.*; public class image extends Applet { Image img; public
Java Image Browsing Applet
Java Image Browsing Applet  Hi. I want to create an applet which is embedded in html page which display image by browsing the files in the computers hard disk... Please help me out
Crop Image Code in Applet
Crop Image Code in Applet  Sir, Can somebody please provide me with code to crop and save an image in applet
Crop Image Code in Applet
Crop Image Code in Applet  Sir, Can somebody please provide me with code to crop and save an image in applet
Applet
Applet  Write a ava applet that sets blue color foreground and yellow color background at the start of an applet
Applet
Applet  Write a short note on applet life cycle
Applet
Applet  Give the class hierarchy of an Applet class
applet
applet  Explain different stages in the lifecycle of an applet with figure.   Stages of Applet: Life cycle of an Applet: init(): This method is called to initialized an applet start(): This method is called after
Applet
Applet  how to run an applet on a web browser
applet
applet  What is the immediate superclass of the Applet class
Applet
Applet  Write a Java applet that drwas a line between 2 points. The co-ordinates of 2 points should be passed as parametrs from html file. The color of the line should be red
Applet
Applet  Explain the start() and stop() methods of applet life cycle.   Start and Start method of Applet Life Cycle Start () method: The start method of an applet is called after the initialization method init
applet
applet  applet to open new tab not working.here's my code import...*; public class NewURL extends Applet implements ActionListener{ public void init... to open page in same window } catch (MalformedURLException e
Applet
Applet  Draw the class hierarchy of an Applet class. Also explain how to set background and forground colors in java
applet
applet  what is applet in java   An applet is a small program that can be sent along with a Web page to a user. Java applets can perform... the following link: Applet Tutorials
image scrolling
image scrolling  A brief description of scrolling image
scrolling image
scrolling image  How create a scrolling image in java
Write a Java applet to draw cylinder and pentagon shapes.
Write a Java applet to draw cylinder and pentagon shapes.  Write a Java applet to draw cylinder and pentagon shapes
applet Question
applet Question  Write a java applet to display a circle in a rectangle
applet question
applet question  Write a java applet to display a rectangle inside a circle
Tutorials   
Java Spring Hibernate Struts Training Error in calling javascript function from java prg Creating an Applet java program Display Java in JSP Draw bufferimage in jpanel using netbeans Moving Applet Problem c programming Attendence Management system java program of different shapes help applet printing p applet dought Help please, some strange errors Write an applet to display scrolling image in an applet window using thread. Simple Java applet that need usernam, password and textfield. conversion Applet java program java program java program scrolling text in applet java java applet java applet project in java using applet and servlet...which tool i should use?eclipse or netbeans? java user input to database user input to database user input to database button to accept user input jframe what is web .config method Can any one please help me in this ,,,,,,, need java code for this ,,,,please anyone applet question Write an Applet which display current date and time on the web page?? Write an Applet which display current date and time on the web page?? Java Applet - Adding a Button to Decrease a Total Applet Application how to drag top most images which is draw on applet. convert java Application to Java Applet convert java Application to Java Applet Problem In applet Its run on browser but hang and blinking when image is draging some where. how to access database in applet How to add dropdown list in a row of a sort table applet? java project topics plz anyone can solve my Layout Manager Project Guidance applet is running but no display

Ads

 
Advertisement null

Ads