JPR 1
JPR 1
AND
MAHARASHTRA STATE BOARD OF TECHNICAL
EDUCATION, MUMBAI
Created
withPDFBear.
CERTIFICATE
Place:Aurangabad
Date:
PRINCIPAL
Created
withPDFBear.
ACKNOWLEDGEMENT
We would like to express our thanks to the people who have helped us most
throughout our project. We would like to express our sincere thanks to the principal of
CSMSS College of Polytechnic Dr G.B.Dongre for being always with us as a
motivator. We are thankful to the H.O.D Mr S.U. Kakde of Computer Engineering
Department for his kind support. We are grateful to our Project Guide Mr V.N.
Shahane for nonstop support and continuous motivation for the project. His help
made us possible to complete our project with all accurate information. A special
thanks of our goes to our friends who helped us in completing the project, where they
all exchanged their own interesting ideas. We wish to thanks our parents for their
personal support or attention who inspired us to go our own way. Finally, we would
like to thank God who made all things possible for us till the end.
Created
withPDFBear.
•••••••••••••••••••••••••••••••••INDEX••••••••••••••••••••••••••••••••••••
2. RATIONALE ..................................................................................... 3
Created
withPDFBear.
1. MICRO–PROJECT PROPOSAL
ACTIONPLAN:
1
Created
withPDFBear.
RESOURCES REQUIRED:
Approved by,
Mr V.N.Shahane
2
Created
withPDFBear.
2. RATIONALE
3
Created
withPDFBear.
3. AIMS / BENEFITS OF THE MICRO-PROJECT
Micro-Project aims at
Benefits of project:
4
Created
withPDFBear.
5. LITERATURE REVIEW
Applet is a special type of program that is embedded in the webpage to generate the dynamic
content. It runs inside the browser and works at client side.
Advantages of Applet:
Drawback of Applet
Plug in is required at client browser to execute applet.
5
Created
withPDFBear.
Life cycle methods for Applet:
The java. applet. Applet class 4 life cycle methods and java.awt Component class provides 1
life cycle methods for an applet.
For creating any applet java. applet. Applet class must be inherited. It provides 4 life cycle
methods of applet.
1. public void init(): is used to initialized the Applet. It is invoked only once.
2. public void start(): is invoked after the init() method or browser is maximized. It is used to
start the Applet.
3. public void stop (): is used to stop the Applet. It is invoked when Applet is stop or browser
is minimized.
4. public void destroy(): is used to destroy the Applet. It is invoked only once.
1. drawOval
Syntax:
2. drawRect
The drawRect method draws a rectangle outline for the given position and size.
We use the graphics context’s current color to draw the rectangle’s outline color.
Created
withPDFBear.
Syntax:
Example:
Parameters:
3. drawLine
The line is the simplest shape that we can draw with the Graphics class.
The drawLine() method takes two pair of coordinates (x1, y1) and (y1, y2) as arguments and
draws a line between them.
Syntax:
g.drawLine (x1, y2, x2, y2);
Example:
g.drawLine (10, 20, 10,100);
1. public abstract void drawstring String str, int x, int y): is used to draw the specified
string.
2. public void drawRect (int x, int y, int width, int height): draws a rectangle with the
specified width and height.
3. public abstract void fillRect (int x, int y, int width, int height): is used to fill rectangle
with the default color and specified width and height.
4. public abstract void drawOval(int x, int y, int width, int height): is used to draw oval
with the specified width and height.
5. public abstract void fillOval (int x, int y, int width, int height): is used to fill oval with
the default color and specified width and height.
6. public abstract void drawLine (int x1, int y1, int x2, int y2): is used to draw line between
the points(x1, y1) and (x2, y2). 7
Created
withPDFBear.
7. public abstract boolean and drawImage(Image img, int x, int y, ImageObserver
observer): is used draw the specified image.
8. public abstract void drawArc (int x, int y, int width, int height, int startAngle, int
arcAngle): is used draw a circular or elliptical arc.
9. public abstract void fillArc(int x, int y, int width, int height, int startAngle, int
arcAngle): is used to fill a circular or elliptical arc.
10. public abstract void setColor (Color c): is used to set the graphics current color to the
specified color.
11. public abstract void setFont(Font font): is used to set the graphics current font to the
specified font.
4. drawImage() method
1. public abstract booleandrawImage(Image img, int x, int y, ImageObserver
observer): is used draw the specified image. How to get the object of Image:
The java.applet.Applet class provides getImage() method that returns the object of Image. Syntax:
1. public Image getImage(URL u, String image){}
Other required methods of Applet class to display image:
1. public URL getDocumentBase(): is used to return the URL of the document in which applet
is embedded.
8
Created
withPDFBear.
6. ACTUAL PROCEDURE FOLLOWED
import java.awt.*;
import java.apple.*;
/*<applet code="Micro" width="1500" height="1700" ></applet>*/
public class Micro extends Applet
{
Image img1,img2,img3;
public void init()
{
img1=getImage(getDocumentBase(),"ho.jpeg");
img2=getImage(getDocumentBase(),"car4.png");
img3=getImage(getDocumentBase(),"m.png");
public void paint(Graphics g)
{
try
{
for(inti=0;i<800;i++)
{
g.clearRect(0,0,1500,1700);
g.drawImage(img1,30,0,this);//home
g.drawImage(img2,i,375,this);//car4
g.drawImage(img3,800-i,500,this);//car
Thread.sleep(30);
}}
catch(Exception e)
{}
}
} 9
Created
withPDFBear.
7. OUTPUT OF MICRO-PROJECT
10
Created
withPDFBear.
7. SKILL DEVELOPED/LEARNING OUTCOMES OF
MICRO-PROJECT:
1. Communication
2. Leadership
3. Team management
4. Negotiation
5. Personal organization
6. Risk management
7. Critical thinking
8. Task management
9. Solving problem
11
Created
withPDFBear.
8. APPLICATIONS OF MICRO–PROJECT
Applets are used to make the website more dynamic and entertaining.
12
Created
withPDFBear.