Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 5

P a g e |1

Government Polytechnic

Yavatmal
Session: 2018-19

Micro Project
ON

JAVA PROGRAMMING

Project Topic: Develop a small animation using applet,


graphics and multithreading.

Created By
 Mahesh S Darwankar
 Piyush V Chirde
 Mahesh S Dudhe
 Abhishek S Dhole

POLYTECHNIC II ND YEAR
Java Programming
P a g e |2

Index

INTRODUCTION:

Develop a small animation using applet, graphics


and multithreading.
HARDWARE:

PROCESSOR : INTEL Core i5 or more


KEY BOARD : 108 Enhanced.
MEMORY : 8GB RAM
HARD DISK : 1 TB
MOUSE : ANY

SOFTWARE:

OPERATING SYSTEM : ANI


FRONT END TOOL : java
BACK END TOOL : File System

Program Code:
import java.awt.*;
import java.applet.*;
import java.util.*;

Java Programming
P a g e |3

/*<applet code="MyApplet" width="500" height="500"></applet>*/


public class MyApplet extends Applet implements Runnable
{
Thread t,t1;
public void start()
{
t=new Thread(this);
t.start();
}

public void run()


{
t1=Thread.currentThread();
while(t1==t)
{
repaint();
try
{
t1.sleep(1000);
}
catch(InterruptedException e){}
}
}
public void paint(Graphics g)
{
Calendar cal =new GregorianCalendar();
String hour =String.valueOf(cal.get(Calendar.HOUR));
String minute =String.valueOf(cal.get(Calendar.MINUTE));
String second =String.valueOf(cal.get(Calendar.SECOND));
g.drawOval(90,85,160,160);
g.setColor(Color.BLACK);
g.fillOval(130,120,25,25);
g.fillOval(170,120,25,25);
g.drawArc(130,180,50,20,180,180);
g.setColor(Color.RED);
g.drawString(hour+" : "+ minute+" :" + second,135,170);
}
}

Java Programming
P a g e |4

OUTPUT:

Conclusion:
We successfully created animation of digital clock and smiley face using
applet, graphics, multithreading.

Java Programming
P a g e |5

SUBJECT: (MICRO PROJECT)


Subject Code:
Name of Student:
Enrolment No.:
Exam Seat No.:
Branch: ………….…… Course Code……………….
Title of Micro Project: …………………………………………………………………………………………….
………………………………………………………………………………………………………………………………

Assessment Scheme:
Performance Indicator Weightage Mark Obtained By Student
Process related
a Use of appropriate tool to perform the identified 20%
task(s)
Product related
a Performed /completed the identified task(s) 25%

b Correctness of output achieved 25%


c Completed the micro project in stipulated time 10%

d Correctness of question asked 20%


Total marks obtained out of 10 100%

Java Programming

You might also like