Ajp Micro Project
Ajp Micro Project
MICROPROJECT REPORT
On
“CREATE A DIGITAL CLOCK”
Dr. R. D. Palhade
Principal
ACKNOWLEDGEMENT
INDEX
1. Introduction 2
2. Clock 3
3. Program 4
4. Result 6
5. Conclusion 7
6. Reference 8
1
CREATE A CLOCK
INTRODUCTION
2
CREATE A CLOCK
CLOCK
Features:
Approach:
The requirements for this program are just the basic concepts of Advance
java programming
Create a screen that will show “Current time” of your location which will
be implemented using simple output methods used in Advance java
programming.
In the fore mentioned screen, implementthe HH column, MM column, SS
column, that will contain the time.
In the last screen, a digital clock can be seen finally implemented and
running from the time.
3
CREATE A CLOCK
PROGRAM
import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Font;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import javax.swing.BorderFactory;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.SwingConstants;
import javax.swing.Timer;
public Digital_clock() {
setTitle("Digital Clock");
setSize(600, 300);
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
setResizable(false);
4
CREATE A CLOCK
dateLabel.setHorizontalAlignment(SwingConstants.CENTER);
dateLabel.setVerticalAlignment(SwingConstants.CENTER);
dateLabel.setForeground(Color.WHITE);
// Use a Timer to update the time and date labels every second
Timer timer = new Timer(1000, new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
updateTimeAndDate();
}
});
timer.start();
}
}
}
RESULT
6
CREATE A CLOCK
CONCLUSION
At last, would like to share my experience while doing this micro project.
We learnt many new things about the given topics. The best thing which I can
share is that I developed more interest in this subject. This project gave me real
insight into the create clock world.
A very special thanks to my dear Principal for setting such targets for us. I
enjoyed each and every bit work I had put into this project.
7
CREATE A CLOCK
REFERENCE
11