Java Tutorial

 
 
 
 
/* <applet code=\"BlinkRect\" height=200 width=300> </applet> */

import java.applet.*;
import java.awt.*;

public class BlinkRect extends Applet 
{
       Color colors[] = { Color.cyan, Color.blue, Color.red, Color.green, Color.yellow,
                                  Color.white, Color.black, Color.orange, Color.pink, Color.magenta};
       Dimension d = getSize();

        public void paint(Graphics g){           
            g.fillRect(10,20,150,150);
            for(int i=0;i<colors.length;i++)
            {
                 g.setColor(colors[i]);
                if (i==colors.length-1)
                 {
                      i=0;
                 }
                 repaint();
            }
        }
}

    Related Post:
  1. File handling program to display directory contents

  2. Program to show an example of modifying String objects

  3. File Handling- JAVA

  4. RMI application for getting the final total price of the shopping list with some of the following items and quantities chosen by the user

  5. Program of FTP client and server

  6. Pass the marks of 10 students from the client side design a servlet, which takes these marks and returns the number of students who obtained first cls

  7. Program to show the use of some Math Methods

  8. Program to display text

  9. CORBA based application for addition of two mathematical expressions of the form (ax + by) and displaying the result on client side

  10. Program to read the table elements into a two-dimensional array temperature

  11. Program for calculating area of a circle on server side,when a client sends request along with given radius and then displaying result on client side

  12. Program to display Floyds Triangle of a numbers

  13. Corba program of Count Client Applet, IDL,Server, Client

  14. An applet program to draw different shapes

  15. Word list program that reads a text file and makes an alphabetical list of all the words in that file. The list of words is output to another file

  16. Develop a CORBA based application for addition of two complex numbers and displaying the result on client side

  17. Program of writing Bytes to a File

  18. Biological Sequence Allignment Using Dynamic Programing

  19. File handling program to copy bytes from one file to another

  20. Corba program of UDP client server application which sends the news to the client. Server takes the news from the NewsDataFile located at the server

 
 
Didn't find what you were looking for? Find more on An applet program that display blinking rectangle