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 to append a StringBuffer by StringBuffer, String objects and other Basic Data Types

  2. Program to read the ballots and count the votes cast for each candidate using an array variable count

  3. Program to show an example of using a Static Nested Class

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

  5. An applet program to display moving banner

  6. Program to show the use of operator (>>>) Shift Right, filling with zeros from the left

  7. Biological Sequence Allignment Using Dynamic Programing

  8. Program to show an example of Arrays of String

  9. An applet program that concatenates two string entered in TextField

  10. Program to evaluate following investment equation V=P(1+R)^N

  11. Application which takes your marks of six subjects from the client side and displays the percentage that you have obtained

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

  13. Program to show the use of operator (<<) Shift Left filling with zero from the right

  14. Program of storing and retrieving integers using data streams on a single file

  15. Program using session tracking capability of Servlets, which displays information of current user session by HttpServletRequest object

  16. Program of creating a file using text fields in windows

  17. Encrypt the text that you want to send on the client side. The server side decrypts it after receiving. Append server time after each word in the sent

  18. corba program of client and a DNS server where given a URL the server sends back an IP address

  19. Program to show the use of Bitwise Operator (&) AND

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

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