Home
Tutorials
Core Java
Introduction To Java
Java Evolution
Overview of Java
Constants, Variables and Data Types
Java Operators
Branching Statements
Looping Statements
Classes, Objects and Methods
Inheritance
Array, String and Vectors
Java Interfaces
Java Packages
Applet Programming
Graphics Programming
Advanced Java
Java AWT
Java Event Handling
Java File Handling
Java MultiThreading
Java Swing-I
Java Swing-II
Exception Handling
Socket Programming
Java Database
Java RMI
Java Servlets
Java Beans
Programms
Projects
Downloads
Contact
Java Programming
!doctype>
Polygon in Advanced Java Graphics Programming
/* =========================================================== File Name : Polygon.java WebSite : http://javaproglang.blogspot.in/ Facebook : https://www.facebook.com/AdvanceJavaProgramming Created By : Bintu Chaudhary =========================================================== */ import java.awt.*; import java.applet.*; /*
*/ public class Polygon extends Applet { public void paint(Graphics g) { int xpoints[]={30,200,30,200,30}; int ypoints[]={30,30,200,200,30}; int num=5; g.drawPolygon(xpoints,ypoints,num); } }
After this you can comiple your java applet program as shown below:
c:\jdk1.4\bin\javac Polygon.java
c:\jdk1.4\bin\appletviewer Polygon.java
"Output of Polygon.class"
Download Complete Program
-
Read more »
Arcs in Advance Java Graphics Programming
/* =========================================================== File Name : Arcs.java WebSite : http://javaproglang.blogspot.in/ Facebook : https://www.facebook.com/AdvanceJavaProgramming Created By : Bintu Chaudhary =========================================================== */ import java.awt.*; import java.applet.*; /*
*/ public class Arcs extends Applet { public void paint(Graphics g) { g.drawArc(10,40,70,70,0,75); g.fillArc(100,40,70,70,0,75); g.drawArc(10,100,70,80,0,175); g.fillArc(100,100,70,90,0,270); g.drawArc(200,80,80,80,0,180); } }
After this you can comiple your java applet program as shown below:
c:\jdk1.4\bin\javac Arcs.java
c:\jdk1.4\bin\appletviewer Arcs.java
"Output of Arcs.class"
Download Complete Program
-
Read more »
Circles & Ellipses in Advance Java Graphics Programming
/* =========================================================== File Name : Ellipses.java WebSite : http://javaproglang.blogspot.in/ Facebook : https://www.facebook.com/AdvanceJavaProgramming Created By : Bintu Chaudhary =========================================================== */ import java.awt.*; import java.applet.*; /*
*/ public class Ellipses extends Applet { public void paint(Graphics g) { g.drawOval(10,10,60,50); g.fillOval(100,10,75,50); g.drawOval(190,10,90,30); g.fillOval(70,90,140,100); } }
After this you can comiple your java applet program as shown below:
c:\jdk1.4\bin\javac Ellipses.java
c:\jdk1.4\bin\appletviewer Ellipses.java
"Output of Ellipses.class"
Download Complete Program
-
Read more »
Rectangle in Advance Java Graphics Programming
/* =========================================================== File Name : Rectanlge.java WebSite : http://javaproglang.blogspot.in/ Facebook : https://www.facebook.com/AdvanceJavaProgramming Created By : Bintu Chaudhary =========================================================== */ import java.awt.*; import java.applet.*; /*
*/ public class Rectanlge extends Applet { public void paint(Graphics g) { g.drawRect(10,10,60,50); g.fillRect(100,100,100,0); g.drawRoundRect(190,10,60,50,15,15); g.fillRoundRect(70,90,140,100,30,40); } }
After this you can comiple your java applet program as shown below:
c:\jdk1.4\bin\javac Rectanlge.java
c:\jdk1.4\bin\appletviewer Rectanlge.java
"Output of Rectangle.class"
Download Complete Program
-
Read more »
Lines in Advance Java Graphics Programming
//Drawing Lines import java.awt.*; import java.applet.*; /*
*/ public class Lines extends Applet { public void paint(Graphics g) { g.drawLine(0,0,100,100); g.drawLine(0,100,100,0); g.drawLine(40,25,250,180); g.drawLine(5,290,80,19); } }
After this you can comiple your java applet program as shown below:
"Output of Lines.class"
Download Complete Program
-
Read more »