Java Tutorial

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

public class LineRect extends Applet
{
      public void paint(Graphics g)
      {
           g.drawLine(10,10,50,50);
           g.drawRect(10,60,40,30);
              g.setColor(Color.blue);
           g.fillRect(60,10,30,80);
              g.setColor(Color.green);
           g.drawRoundRect(10,100,80,50,10,10);
           g.setColor(Color.yellow);
           g.fillRoundRect(20,110,60,30,5,5);
           g.setColor(Color.red);
           g.drawLine(100,10,230,140);
           g.drawLine(100,140,230,10);
           g.drawString(\"Line Rectangles Demo\",65,180);
           g.drawOval(230,10,200,150);
           g.setColor(Color.blue);
           g.fillOval(245,25,100,100);
      }
};

    Related Post:
  1. Program in CORBA which takes a long sentence from the client (at least 7 words), passes to the server, server separates out each word

  2. Program of bubble sort

  3. Program, which creates a three thread. One thread display the numbers from 1 to 5, second thread display the square root of that number etc

  4. An applet program to display barchart of given data

  5. An applet program showing Clicked Event on canvas

  6. Program to print triangle of numbers

  7. Program of writing Bytes to a File

  8. Program to declare, initialize and print an array of integers

  9. Program which will read a string and rewrite it in the alphabetical order

  10. Program to show an example of extracting subStrings from a String

  11. Program to delete mth element from an input string

  12. 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

  13. An applet program to display Vertical Color Bar

  14. Program to show the use of operator (>>) Shift Right, propagating the sign bit from the left

  15. An applet program to perform selection sort

  16. 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

  17. Program to show an example of creating a String object from a StringBuffer Object

  18. Program to declare, initialize and print a 2D array of integers

  19. Program to show an example of extraction of characters from a StringBuffer objects

  20. An applet program to draw Polygon Graph with given data

 
 
Didn't find what you were looking for? Find more on An applet program to draw different shapes