To-Do list Application in java project
To-Do list Application in java project
Place: Miraj.
Date: ……………
Team Members :
Oracle's Java
For reference and learning
5 Documentation documentation and N/A
purposes.
Swing tutorials
To ensure functionality
JUnit or similar for unit
7 Testing Framework 1 and reliability of the
testing
application.
4.0 Source Code and Output
import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Component;
import java.awt.Dimension;
import java.awt.Font;
import java.awt.GridLayout;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import javax.swing.BorderFactory;
import javax.swing.Box;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JTextField;
import javax.swing.border.Border;
JLabel index;
JTextField taskName;
JButton done;
Task() {
this.setPreferredSize(new Dimension(400, 20)); // set size of task
this.setBackground(pink); // set background color of task
checked = false;
this.add(taskName, BorderLayout.CENTER);
this.add(done, BorderLayout.EAST);
this.setLayout(layout); // 10 tasks
this.setPreferredSize(new Dimension(400, 560));
this.setBackground(lightColor);
}
}
}
JButton addTask;
JButton clear;
Footer() {
this.setPreferredSize(new Dimension(400, 60));
this.setBackground(lightColor);
TitleBar() {
this.setPreferredSize(new Dimension(400, 80)); // Size of the title bar
this.setBackground(lightColor); // Color of the title bar
JLabel titleText = new JLabel("To Do List"); // Text of the title bar
titleText.setPreferredSize(new Dimension(200, 60)); // Size of the text
titleText.setFont(new Font("Sans-serif", Font.BOLD, 20)); // Font of
the text
titleText.setHorizontalAlignment(JLabel.CENTER); // Align the text to
the center
this.add(titleText); // Add the text to the title bar
}
}
class AppFrame extends JFrame {
AppFrame() {
this.setSize(400, 600); // 400 width and 600 height
this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); // Close on exit
this.setVisible(true); // Make visible
newTask = footer.getNewTask();
clear = footer.getClear();
addListeners();
}
task.getDone().addMouseListener(new MouseAdapter() {
@override
public void mousePressed(MouseEvent e) {
}
});
}
});
clear.addMouseListener(new MouseAdapter() {
@override
public void mousePressed(MouseEvent e) {
list.removeCompletedTasks(); // Removes all tasks that are done
repaint(); // Repaints the list
}
});
}
@interface override {
}
Output
5.0. Conclusion
The To-Do List application successfully addresses the need for effective task management in a user-
friendly manner. By providing essential functionalities such as adding, viewing, and removing tasks, the
application empowers users to organize their daily activities and enhance their productivity.
Throughout the development process, we have implemented core Java programming concepts,
including object-oriented design and data handling, which not only solidified our understanding of the
language but also demonstrated its practical applications in real-world scenarios.
While the current version of the application serves as a solid foundation, there are numerous
opportunities for future enhancements. Potential improvements could include the addition of features
such as task prioritization, due date management, and a graphical user interface, which would further
enrich the user experience.
In summary, this project has not only fulfilled its primary objectives but has also provided valuable
insights into software development and user-centered design. We look forward to continuing the
evolution of this application and exploring new functionalities that can further assist users in managing
their tasks effectively.
Note:
Every course teacher is expected to assign marks for group evolution for each group of students in first 3
columns as per rubrics & individual evaluation in 4TH column for each group of studentsas per rubrics
based on viva.
Signature………………………………………………………………………………
Date:……………………..