Java Report
Java Report
In today's fast-paced world, temperature monitoring plays a crucial role in various domains, including
healthcare, agriculture, environmental monitoring, and industrial applications. A GUI-Based
Temperature Tracker provides a user-friendly interface to record, display, and analyze temperature
variations efficiently.
2. User-Friendly Interface: Provides an intuitive GUI for easy interaction and data visualization.
3. Data Logging & Analysis: Stores past temperature data for trend analysis and future reference.
4. Multi-source Input: Can fetch temperature data from user input, APIs (e.g., OpenW eatherMap), or
sensors.
o CO4: Develop Java Program for implementing event-handling using window-based application
components.
6.0 Code :
import javax.swing.;
import java.awt.event.*;
public class TempTrackerGUI extends JFrame implements ActionListener { JTextField tempFields[] = new
JTextField[7]; JButton calculateButton; JLabel resultLabel;
TempTrackerGUI() {
setTitle("Temperature Tracker");
setSize(450, 450);
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
setLayout(new BorderLayout(10, 10));
setVisible(true);
}
}
7.0 Output:
Note: Output w hen characters or any thin g else than in tegers/fl oat values are en tered
7.0 Sk ills developed
Through the completion of this microproject, w e w ere able to en han ce our skills in the follow in g areas:
W eather An alysis
Healthcare Mon itorin g
Agriculture & Farmin g
In dustrial U se