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

 
 


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

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

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 Pages:
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
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
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
Applet
Applet  Write an applet to display a string in an applet. String should be passed as a parameter to an applet
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
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
Applet
you will see, how to write an applet program. Java source of applet... of a parameter passed to an applet can be retrieved using getParameter() function. E.g.... the parameter value to test the value passed from html page. Applet will display
Applet - Applet
Applet   Namaste, I want to create a Menu, the menu name is "Display". Under Display Menu in two Item is "Shortycut Key" and "Version". when i click...------------------------"); g.drawString("Demo of Java Applet Window Event Program"); g.drawString("Java
applet images sleeping programme - Applet
applet images sleeping programme  Dear Sir,         I shall be much tankful to you, if u can kindly give me the programe for    In a Applet how to display more than one image in sleep method, which should come one after another
applet security error - Security
applet security error  hi, i am using netbeans 6.0,apache tomcat server. I implemented the applet in my jsp page using plugin. when i execute... applet is loaded using the Java Plugin from a jsp page using the plugin tag
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 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 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
applet question
applet question  Write a java applet to display atriangle inside a circle
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  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
The Java Applet Viewer
When we run the applet viewer it will display the window as shown below... tags. The difference in using the applet viewer and the web browser to run... i.e. it doesn't display HTML code. So we should test our program in applet
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
methods in the applet - Applet
; public class applet1 extends Applet { String m; public void init... applet is simular to the contructor defined in a java application. The purpose... is used to start a thread as an example. The start() method is invoked each time
applet question
applet question  sir please tell me that how can i call an event on clicking on applet window without using any component
Applet run with appletviewer but not in browser, any code problem.
Applet run with appletviewer but not in browser, any code problem.  Hi,My problem is when I am running my applet in appletviewer index.html, Its work.../index.html I am using "dynamic web application" in eclipse. I want all
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
Example - Tiny Window
; The image on the left is the window in its "natural" size. There's nothing... a very small window! // This is just about the smallest GUI program you can write... the window on the screen. This also starts a separate thread to monitor the user
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
java applet problem - Applet
java applet problem  i was doing a program using java applet. I want... and to exit from the applet respectively.Now i want to display a message when...*; import java.awt.*; public class Calculator extends Applet implements
integration of webcam - Applet
_Debug; Image image_WebcamImage; Thread thread_This; int int... initial image: "+e.toString()); return; } thread_This = new... this project using aplets.could u please help me with the code.  Hi friend
Applet program
Applet program  Write a java applet for the following case- The hotel Maharaja provides the facility to its customers to select any one room (from.... 100. All above charges are applicable per day basis. The applet will display
applet - Applet
applet   how to draw textboxes using applets  Hi Friend...*; import java.awt.*; public class CreateTextBox extends Applet implements.../applet/ Thanks
Applet - Date Calendar
Applet  GIVE ME example of date-calendar application using apllets...; import java.applet.Applet; public class CalenderTest extends Applet...; private Thread clockThread = null; public void start
The Java Applet Viewer
run the applet viewer it will display the window as shown below... in using the applet viewer and the web browser to run the applet is that the applet viewer only deals with the applet code not the HTML cod i.e. it doesn't display
Applet - spell check program - Applet
Applet - spell check program  hi, i am writing a applet program -say... READ WORD BY WORD FROM TEXTAREA AND DISPLAY EACH WORD ON A TEXTFIELD... ALSO ATTACH THE APPLET PROGRAM I HAVE ALREADY DEVELOPED IF PERMITED
unable to see the output of applet. - Applet
unable to see the output of applet.  Sir, I was going through the following tutorial http://www.roseindia.net/java/example/java/applet...://www.roseindia.net/java/example/java/applet/FirstApplet.html but the problem
The Java Applet Viewer
in using the applet viewer and the web browser to run the applet... display HTML code. So we should test our program in applet viewer and web browser... in its own window. The syntax for the applet viewer is: appletviewer Options
How to save image on the server by applet
How to save image on the server by applet  HI, in my project I am using applet and creating a chart by jcchart. Now when the chart has ploated... as a gif image on the server directory. Can any Body help me how can I do it Thanks
How to save image on the server by applet
How to save image on the server by applet  HI, in my project I am using applet and creating a chart by jcchart. Now when the chart has ploated... as a gif image on the server directory. Can any Body help me how can I do it Thanks
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
The Java Applet Viewer
applet tags. The difference in using the applet viewer and the web browser to run... applet referenced by the documents in its own window. The syntax for the applet... in the Java debugger. Using this option we can debug an applet
Applet Write Files Example
Applet Write Files Example       In this section, you will learn how to write to a file from...;TITLE> Write file example </TITLE> <applet code="
Java Basic - Applet
Java Basic  My Applet Programs are Compiling as well as Running properly. But when I close the Applet window I am getting an Error Message as: Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException and also 10
Applet - Passing Parameter in Java Applet
parameters. Value of a parameter passed to an applet can be retrieved using... page. Applet will display "Hello! Java Applet"  if no parameter is passed to the applet else it will display the value passed as parameter. In our
Using Applet in JSP
Using Applet in JSP     ...: position of applet or bean display on the browser. height: as its name signifies, height of applet or bean display width: as its name signifies
java.applet package examples
you how to write to a file from an applet.   Display image in the applet In this section you will learn how to display image on you applet... and lines in applet.    Drawing Shapes using color Applet
creating an applet for student management system
creating an applet for student management system  Write an applet/awt... the applet/awt application is executed it will display the screen... be displayed using a report when the user presses a "report" button. Initially make
Opening a URL from an Applet
window from an applet. This program shows that how a url is opened in same... used for opening url from an applet. This program is using two functions in which... Opening a URL from an Applet     
java applet - Applet
java applet  I want to close applet window which is open by another button of applet program. plz tell me!   Hi Friend, Try... java.awt.event.*; public class CloseWindow extends Applet implements ActionListener
What is Applet? - Applet
What is Applet?  What is Applet?  Hi,Here is a little information about Applet.An applet is a little application. Prior to the World Wide... sometimes called "applets." On the Web, using Java, the object-oriented
Applet database access - Applet
Applet database access  HI... I'm having an applet where we should display the database values in the applet... It works fine in the local system... but when its in the server, we r getting null values in the local system.. I

Ask Questions?

If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.

Ask your questions, our development team will try to give answers to your questions.