AMRUTVAHINI POLYTECHNIC, SANGAMNER
DEPARTMENT OF COMPUTER TECHNOLOGY
ACADEMIC YEAR:- 2024-2025
This is to certify That The Project Report Entitled
“To-do List”.
Course: - Advance Java Programming (22517)
Roll No. Enrollment No Name Of Student
139 2200800607 Gunjal Rushikesh Ravindra
147 2200800619 Kadlag Janmenjay Ganesh
150 2200800622 Kanwade Sanket Balasaheb
In Partial Fulfillment of The Requirement of
Computer Technology
During the Academic Year 2024-2025
Prof. Bhabad V.M Prof. Kale G.B
Signature of the Teacher Signature of H.O.D
Micro-Project Report
1.0. Rationale:
The To-Do List project aims to help users manage their tasks efficiently. By allowing users to add,
complete, and delete tasks, it provides a simple way to stay organized. This project also helps in practicing
advanced Java programming concepts, such as object-oriented programming and data management. The
focus is on creating a user-friendly interface that enhances the overall task management experience.
2.0. Aims/Benefits of the micro-project:
Aims:
- To develop a functional To-Do List application using advanced Java programming.
- To reinforce concepts of object-oriented programming, data structures, and user interface design.
- To provide a practical example of managing user tasks efficiently.
Benefits:
- Improved Task Management: Helps users organize and keep track of their tasks easily.
- Skill Development: Enhances programming skills and understanding of Java.
- User Experience: Offers a straightforward and interactive way to manage daily activities.
- Practical Application: Provides real-world experience in software development and project
implementation.
3.0. Course Outcomes Addressed:
[Link]. Course Outcome Statement
CI505.1 Implement³ Graphical user interface (GUI) programs using AWT and swing
components. Arrange the GUI components using a different layout manager.
CI505.2 Implement³ Event driven programs using the delegation event model, Adapter
classes & the inner classes.
CI505.3 Demostrate³ Java programs using networking concepts.
CI505.4 Implement³ database driven business applications using the database API'S two tier
and three tier models and the [Link] package.
CI505.5 Use³ and Implement Web based applications using servlets, JSP,servlet for cookies
and session tracking
4.0. Literature Review:
The To-Do List application has been a popular project in software development, serving as an
introductory platform for learning programming concepts. Many studies highlight its role in enhancing
task management skills, as users can easily add, remove, and prioritize tasks.
Various programming languages, including JavaScript and Java, have been utilized to create these
applications, demonstrating the versatility of coding in managing everyday tasks.
Additionally, literature emphasizes the importance of user-friendly interfaces, which improve user
engagement and satisfaction. The use of object-oriented programming in Java allows for better
organization of code and easier maintenance, making the To-Do List project an effective learning tool for
aspiring developers.
Overall, developing a To-Do List application serves as an effective educational exercise, combining
theoretical knowledge with practical skills.
5.0 Actual Resources Used:
Sr. Name of Resource Specifications Quantity Remarks
No.
1. Computer System with broad Lenovo - Intel Core i5, 1
specifications 8GB RAM
2. Operating System Window 11 1
3. Software VS Code 1
4. Keyboard Keychron 1
5. Mouse Logitech 1
6.0. Actual Methodology Followed:
1. Project Planning:
- Define the project scope and goals.
- Decide on the features to implement (adding, deleting, and completing tasks).
2. Design:
- Create a simple user interface layout for the To-Do List application using Java Swing or JavaFX.
- Plan the overall structure of the program, including classes and methods.
3. Implementation:
- Setup: Create a new Java project in an IDE.
- Class Creation: Develop classes for tasks and the main application.
- User Interface: Use Java Swing or JavaFX to build the graphical interface for the application.
- Functionality: Implement methods to add, complete, and delete tasks.
- Data Management: Use data structures to store and manage tasks.
4. Testing:
- Test each feature of the application to ensure it works as intended.
- Check for bugs and fix any issues found during testing.
5. Documentation:
Write documentation for the code, explaining how the application works and how to use it.
6. Deployment:
Package the application for distribution and provide instructions for running it.
7. Feedback and Iteration:
Gather feedback from users and make improvements based on their suggestions, if necessary.
Program:
import [Link].*;
import [Link];
import [Link].*;
import [Link].*;
import [Link].*;
import [Link].*;
import [Link];
public class AdvancedTodoListWithCheckbox extends JFrame {
private [Link]<Todo> todos; // Specify [Link] explicitly
private DefaultListModel<JCheckBox> todoListModel;
private JList<JCheckBox> todoList;
private JTextField todoInput;
private JButton addButton, deleteButton;
// File to store the todo list
private static final String FILE_NAME = "[Link]";
public AdvancedTodoListWithCheckbox() {
// Set up the frame
setTitle("Advanced Todo List");
setSize(500, 400);
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
setLayout(new BorderLayout());
getContentPane().setBackground(new Color(245, 245, 245)); // Light background
color
// Load todos from file
todos = loadTodos();
// Create components
todoListModel = new DefaultListModel<>();
todoList = new JList<>(todoListModel);
todoInput = new JTextField(20);
addButton = new JButton("Add Todo");
deleteButton = new JButton("Delete Todo");
// Set custom fonts and colors
[Link](new Font("SansSerif", [Link], 16));
[Link](new EmptyBorder(10, 10, 10, 10));
[Link](new Font("SansSerif", [Link], 16));
[Link](new Color(66, 135, 245));
[Link]([Link]);
[Link](new Color(245, 66, 66));
[Link]([Link]);
// Set up the todo list in GUI with checkboxes
for (Todo todo : todos) {
JCheckBox checkBox = new JCheckBox([Link](), [Link]());
updateCheckBoxStyle(checkBox, [Link]());
[Link](checkBox);
}
// Set the custom cell renderer to display JCheckBox properly in JList
[Link](new ListCellRenderer<JCheckBox>() {
@Override
public Component getListCellRendererComponent(JList<? extends JCheckBox>
list, JCheckBox value, int index,boolean isSelected, boolean cellHasFocus) {
[Link](isSelected ? [Link]() :
[Link]());
[Link](isSelected ? [Link]() :
[Link]());
return value;
}
});
// Panel for the input field and buttons
JPanel inputPanel = new JPanel();
[Link](new Color(245, 245, 245)); // Same as background
[Link](new FlowLayout());
[Link](new EmptyBorder(10, 10, 10, 10));
JLabel label = new JLabel("New Todo:");
[Link](new Font("SansSerif", [Link], 16));
[Link](label);
[Link](todoInput);
[Link](addButton);
JPanel buttonPanel = new JPanel();
[Link](new FlowLayout());
[Link](new EmptyBorder(10, 10, 10, 10));
[Link](new Color(245, 245, 245)); // Same as background
[Link](deleteButton);
// Add components to the frame
add(inputPanel, [Link]);
add(new JScrollPane(todoList), [Link]);
add(buttonPanel, [Link]);
// Action listeners for buttons
[Link](e -> addTodo());
[Link](e -> deleteTodo());
// Listener for checkbox changes
[Link](new MouseAdapter() {
public void mouseClicked(MouseEvent event) {
int index = [Link]([Link]());
if (index != -1) {
JCheckBox checkBox = [Link](index);
[Link](![Link]());
Todo todo = [Link](index);
[Link]([Link]());
updateCheckBoxStyle(checkBox, [Link]());
saveTodos();
}
}
});
// Set the frame visibility
setVisible(true);
}
// Method to add a new todo
private void addTodo() {
String todoName = [Link]().trim();
if (![Link]()) {
Todo newTodo = new Todo(todoName, false);
[Link](newTodo);
JCheckBox checkBox = new JCheckBox([Link]());
updateCheckBoxStyle(checkBox, false);
[Link](checkBox);
saveTodos(); // Save the updated list to file
[Link]("");
}
}
// Method to delete the selected todo
private void deleteTodo() {
int selectedIndex = [Link]();
if (selectedIndex != -1) {
[Link](selectedIndex);
[Link](selectedIndex);
saveTodos(); // Save the updated list to file
}
}
// Method to update the appearance of the checkbox when the task is complete
private void updateCheckBoxStyle(JCheckBox checkBox, boolean complete) {
Font font = [Link]();
Map<TextAttribute, Object> attributes = new HashMap<>([Link]());
if (complete) {
[Link]([Link], TextAttribute.STRIKETHROUGH_ON);
[Link]([Link](attributes));
[Link]([Link]);
} else {
[Link]([Link], false);
[Link]([Link](attributes));
[Link]([Link]);
}
}
// Method to load todos from the file
private [Link]<Todo> loadTodos() {
[Link]<Todo> todoList = new ArrayList<>(); // Specify [Link]
explicitly
try (BufferedReader reader = new BufferedReader(new FileReader(FILE_NAME))) {
String line;
while ((line = [Link]()) != null) {
String[] parts = [Link](";");
if ([Link] == 2) {
[Link](new Todo(parts[0], [Link](parts[1])));
}
}
} catch (IOException e) {
[Link]("Error loading todos: " + [Link]());
}
return todoList;
}
// Method to save todos to the file
private void saveTodos() {
try (PrintWriter writer = new PrintWriter(new FileWriter(FILE_NAME))) {
for (Todo todo : todos) {
[Link]([Link]() + ";" + [Link]());
}
} catch (IOException e) {
[Link]("Error saving todos: " + [Link]());
}
}
// Main method to run the application
public static void main(String[] args) {
new AdvancedTodoListWithCheckbox();
}
}
// Todo class to represent a todo item
class Todo {
private String name;
private boolean complete;
public Todo(String name, boolean complete) {
[Link] = name;
[Link] = complete;
}
public String getName() {
return name;
}
public boolean isComplete() {
return complete;
}
public void setComplete(boolean complete) {
[Link] = complete;
}
@Override
public String toString() {
return name; // Only return the task name, without any additional text
}
}
7.0. Outputs of Micro-Project:
Initially:
After Adding Items:
After Marking Items done:
After Deleting Items:
8.0. Skills Developed/Learning Outcomes:
1. Programming Skills: Enhanced understanding of Java syntax and programming concepts through
hands-on coding.
2. GUI Development: Learned how to create graphical user interfaces using Java Swing, improving
design and layout skills.
3. Event Handling: Gained experience in handling user inputs and events, making the application
interactive.
4. Data Management: Understood how to manage and manipulate data using collections (like
ArrayList) to store tasks.
5. Problem-Solving: Improved problem-solving skills by designing and implementing the functionality
of a real-world application.
6. Project Management: Developed project planning and organization skills by managing project
requirements and tasks.
7. Testing and Debugging: Enhanced debugging skills by testing the application for errors and fixing
them.
8. Code Reusability: Learned the importance of creating reusable code through the use of classes and
methods.
9.0. Applications of this Micro-Project:
● Personal Task Management: Helps individuals organize their daily tasks and manage time
effectively.
● Project Planning: Useful for planning and tracking progress on projects by breaking them down into
manageable tasks.
● Team Collaboration: Can be adapted for team use to assign and monitor tasks among team
members.
● Goal Setting: Assists in setting personal or professional goals and tracking their completion.
● Habit Tracking: Can be used to develop and maintain good habits by checking off daily tasks.
● Educational Use: Helps students manage assignments and study schedules efficiently.
● Reminders: Can serve as a reminder tool for important deadlines and appointments.
10.0. References:
1. Oracle. (n.d.). Java Platform, Standard Edition (Java SE) Documentation. Retrieved from
[Link]
2. Oracle. (n.d.). Swing Tutorial. Retrieved from [Link]
3. Oracle. (n.d.). Collections Framework. Retrieved from
[Link]
4. GeeksforGeeks. (n.d.). Java Programming Language. Retrieved from
[Link]
5. [Link]. (2021). Java Full Course - Learn Java in 8 Hours | Java Programming | Java
Tutorial | Edureka. Retrieved from [Link]
Prof. Bhabad V.M
(Project Guide)