Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Home Answers Viewqa Applet Write an applet to display scrolling image in an applet window using thread.
Login         

View Questions and Answers by Category

Advertisements


 
Have Programming Question? Ask it here!
 
 
 


brijesh dhameliya
Write an applet to display scrolling image in an applet window using thread.
1 Answer(s)      a year and 7 months ago
Posted in : Applet


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


Advertisement
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 atriangle inside a circle
Advertisements
 

 

 

DMCA.com