0% found this document useful (0 votes)
10 views17 pages

Shravani Ajp Project

The document is a project report on the development of a Basic Notepad Application submitted by Masiha Silviya Santosh for a diploma in Computer Engineering. It outlines the rationale, aims, methodology, and outcomes of the project, emphasizing the use of Java programming concepts such as GUI development and file handling. The report also discusses future enhancements and applications of the project, showcasing its educational value and practical utility.

Uploaded by

masihasilveya
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views17 pages

Shravani Ajp Project

The document is a project report on the development of a Basic Notepad Application submitted by Masiha Silviya Santosh for a diploma in Computer Engineering. It outlines the rationale, aims, methodology, and outcomes of the project, emphasizing the use of Java programming concepts such as GUI development and file handling. The report also discusses future enhancements and applications of the project, showcasing its educational value and practical utility.

Uploaded by

masihasilveya
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 17

A

ProjectReportOn
“Basic Drawing Application”

Submitted In Partial Fulfillment Of Requirement


For The Award Of
Diploma In Computer Engineering Of Government Polytechnic, Dharashiv
Affiliated To

Maharashtra State Board of Technical Education


Submitted By
Masiha Silviya Santosh

Under The Guidance of

Mr.A.B.Gaikwad

Department of Computer Engineering


Government Polytechnic College,Dharashiv
MAHARSHTRA STATE BOARD OF
TECHNICAL EDUCATION

CERTIFICATE

Government Polytechnic Dharashiv

This is to certify that Ms. Masiha Silviya Santosh roll no. 32 of 5th Semester of diploma in
Computer engineering has completed the term work satisfactorily in Advance Java
Programming Scripting (programming with python -) For academic year 2024-2025 as
prescribed in the curriculum.

Place :- Dharshiv Enrolment No :- 2201180234

Date :- Seat No :-

Subject Teacher HeadofDepartment Principal

Mr.A.BGaikwad Mr.A.BGaikwad Mr.S.LAndhare


GOVERNMENT POLYTECHNIC DHARASHIV

ACKNOWLEDGMENT

The success and final outcomes of this project required substantial guidance and assistance from
many individuals, and I feel privileged to have received their support throughout the process.
My achievements are a direct result of their supervision, and I want to express my gratitude.

I am especially thankful to my project guide, Mr. A.B. Gaikwad sir, and the Head of the
Computer Department. Their keen interest in my work and consistent guidance were
instrumental in navigating the challenges I faced. I greatly appreciate their valuable insights and
unwavering support, which were crucial to the successful completion of my project.

I would also like to thanks to our principal Mr. Andhare sir who gave me the golden opportunity
to do this wonderful project that helped mein doing a lot of research and I came to know about
so many new things.Lastly, I thank the Almighty, my parents, and my classmates for their
constant encouragement, without which this assignment would not have been possible.

Your Sincerely,

Masiha Silviya

Basic Notepad Application


GOVERNMENT POLYTECHNIC DHARASHIV

INDEX

Content

1. Rationale........................................................................................5
2. Aimofthemicroproject...................................................................5
3. Courseoutcomesaddressed............................................................5
4. Literaturereview
1. Steps For Project Implementation..................6
2. Program…………………………………..7-10
3. Explaination of Program………………...11-12
5. ActualMethodology………………………………………….…13
6. Actual Resources required…………………………....................13
7. OutputoftheProject................................................................14-15
8. Skilldeveloped/learningoutofthismicroproject…………............16
9. Application of the Project...........................................................16
10.Conclusion...................................................................................16
11.FutureScope.................................................................................16
12.References....................................................................................17

Basic Notepad Application


GOVERNMENT POLYTECHNIC DHARASHIV

MICROPROJECT REPORT
Basic Notepad Application
1.0 Rationale:

This project focuses on the development of a Basic Notepad Application. A robust notepad
application is a fundamental utility for managing and editing text documents. It provides users
with essential tools for creating, saving, and opening files while fostering productivity and
efficiency. Moreover, it showcases key programming concepts such as event handling, GUI
development, and file I/O operations.
The application demonstrates how a simple text editor can streamline everyday tasks by offering
basic functionality like editing, saving, and retrieving text data. This project highlights the
significance of interactive user interfaces and the practical implementation of Java programming
concepts.

2.0 Aim/Benefits of the Micro Project :

The goal of this Basic Notepad Application project is to create an efficient, user-friendly text
editing tool that simplifies the process of writing, editing, and managing text files. The system
aims to provide users with an intuitive interface for creating and saving documents, while
ensuring essential functionalities like opening existing files, editing content, and saving changes
seamlessly. Additionally, it demonstrates key programming concepts, such as event handling
and file management, in a practical and accessible manner.

3.0 Course Outcomes Achieved:


a) Develop programs using GUI Framework (AWT and Swing).
b) Handle events of AWT and Swings components.
c) Develop programs to handle events in Java Programming.

4.0 Literature Reviews :-


The Basic Notepad Application provides a simple and efficient platform for text editing. It
allows users to create, edit, open, and save text files with ease, offering an intuitive interface for
everyday tasks. Built with robust file handling and event-driven programming, it ensures
seamless functionality and reliable performance, making it an ideal lightweight tool for basic
text management.

5
GOVERNMENT POLYTECHNIC DHARASHIV

Steps For Project Implementation

Step 1: Setup.

 Setup jdk 1.8 environment in your laptop. Download notepad++ app.

Step 2: Create a file.

 Create file named BasicNotepad in notepad++ app.


 Save it to the destination by using extension ‘.java’ (BasicNotepad.java)

Step 3: Compile and Run.

 Open Command Prompt. Navigate to the project folder.

Basic Notepad Application 6


GOVERNMENT POLYTECHNIC DHARASHIV

PROGRAM

 Basic Notepad Application

Import javax.swing.*;
Import java.awt.event.*;
Import java.io.*;

Public class BasicNotepad extends JFrame implements ActionListener {


// Components of the notepad
JTextAreatextArea;
JMenuBarmenuBar;
JMenufileMenu;
JMenuItemnewItem, openItem, saveItem, exitItem;

// Constructor
Public BasicNotepad() {
// Initialize the frame
setTitle(“Basic Notepad”);
setSize(800, 600);
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

// Initialize the text area and add it to the frame with a scroll pane
textArea = new JTextArea();
JScrollPanescrollPane = new JScrollPane(textArea);
Add(scrollPane);

// Create the menu bar


menuBar = new JMenuBar();

// Create the “File” menu

7
GOVERNMENT POLYTECHNIC DHARASHIV

fileMenu = new JMenu(“File”);

// Create menu items


newItem = new JMenuItem(“New”);
openItem = new JMenuItem(“Open”);
saveItem = new JMenuItem(“Save”);
exitItem = new JMenuItem(“Exit”);

// Add action listeners to the menu items


newItem.addActionListener(this);
openItem.addActionListener(this);
saveItem.addActionListener(this);
exitItem.addActionListener(this);

// Add menu items to the “File” menu


fileMenu.add(newItem);
fileMenu.add(openItem);
fileMenu.add(saveItem);
fileMenu.addSeparator(); // Add a separator line
fileMenu.add(exitItem);

// Add the “File” menu to the menu bar


menuBar.add(fileMenu);

// Set the menu bar for the frame


setJMenuBar(menuBar);

// Make the frame visible


setVisible(true);
}

// Event handling for menu items

8
Basic Notepad Application
GOVERNMENT POLYTECHNIC DHARASHIV

@Override
Public void actionPerformed(ActionEvent e) {
If (e.getSource() == newItem) {
// New file: clear the text area
textArea.setText(“”);
} else if (e.getSource() == openItem) {
// Open file: Show input dialog to ask for the file name
String fileName = JOptionPane.showInputDialog(this, “Enter the file name to
open:”);
If (fileName != null) {
File file = new File(fileName);
If (file.exists()) {
Try (BufferedReader reader = new BufferedReader(new FileReader(file))) {
textArea.read(reader, null);
} catch (IOException ex) {
JOptionPane.showMessageDialog(this, “Error opening file!”, “Error”,
JOptionPane.ERROR_MESSAGE);
}
} else {
JOptionPane.showMessageDialog(this, “File not found!”, “Error”,
JOptionPane.ERROR_MESSAGE);
}
}
} else if (e.getSource() == saveItem) {
// Save file: Show input dialog to ask for the file name
String fileName = JOptionPane.showInputDialog(this, “Enter the file name to
save:”);
If (fileName != null) {
File file = new File(fileName);
Try (BufferedWriter writer = new BufferedWriter(new FileWriter(file))) {
textArea.write(writer);
JOptionPane.showMessageDialog(this, “File saved successfully!”);
} catch (IOException ex) {

9
Basic Notepad Application
GOVERNMENT POLYTECHNIC DHARASHIV

JOptionPane.showMessageDialog(this, “Error saving file!”, “Error”,


JOptionPane.ERROR_MESSAGE);
}
}
} else if (e.getSource() == exitItem) {
// Exit: close the application
System.exit(0);
}
}

// Main method to run the Notepad application


Public static void main(String[] args) {
New BasicNotepad();
}
}

10
Basic Notepad Application
GOVERNMENT POLYTECHNIC DHARASHIV

Explanation of Program

The provided Java code is a basic implementation of a Notepad Application using the Swing
library. Below is a detailed explanation of its components:

1.Import Statements

 Javax.swing.*: Provides classes for creating the GUI components like JTextArea,
JMenuBar, and JFrame.
 Java.awt.event.*: Allows handling user interactions (like clicking buttons or menu
items).
 Java.io.*: Facilitates file handling operations (read/write files)

2. Class Declaration

 The class BasicNotepad extends JFrame, making it a Swing-based GUI application.


 Implements ActionListener to handle user events like menu item clicks.

3. Instance Variables

 JTextArea: A text area where users can write or edit text.


 JMenuBar: The top menu bar of the application.
 JMenu: The "File" menu within the menu bar.
 JMenuItem: Menu options like "New", "Open", "Save", and "Exit".

4. Constructor

The constructor BasicNotepad() initializes and sets up the application:


 Frame Setup:Sets the title, dimensions (800x600), and default close operation for the
application window.
 Text Area:Initializes a JTextArea and wraps it in a JScrollPane for scroll
functionality.
 Menu Bar and Menu:Creates a JMenuBar and adds a JMenu labeled “File”.
Adds menu items (“New”, “Open”, “Save”, “Exit”) to the menu.
 Event Handling:Registers the current instance (this) as the event listener for each
menu item.
 Finalization:Adds the menu bar to the frame and makes the frame visible.

11
Basic Notepad Application
GOVERNMENT POLYTECHNIC DHARASHIV

5. Event Handling

The method actionPerformed(ActionEvent e) handles user interactions:


 New:Clears the JTextArea content to start a new file.
 Open:Displays a dialog asking for the file name.
Reads the file using BufferedReader and displays its content in the text area.
Displays an error if the file doesn’t exist or cannot be opened.
 Save:Displays a dialog asking for the file name.
Writes the text area content to the specified file using BufferedWriter.
Displays success or error messages based on the outcome.
 Exit:Exits the application using System.exit(0).

6. Main Method
The main method creates an instance of the BasicNotepad class, launching the application.

7.Key Features of the Code

 Graphical User Interface (GUI): Built using Swing components (JFrame,


JTextArea, JMenuBar).
 File Handling:BufferedReader and BufferedWriter are used for reading and writing
text files.
 Event Handling:ImplementsActionListener to perform actions when menu items are
clicked.
 User Interaction:UsesJOptionPane dialogs for file name inputs and error messages.
 Lightweight Design:A simple text editor with essential features for basic file
management.

This program serves as an excellent example of integrating GUI development, event


handling, and file I/O in Java.

12
GOVERNMENT POLYTECHNIC DHARASHIV

5.0 ActualMethodologyFollowed:

1. Defined the scope: User-friendly Basic Notepad Application .


2. Design:

 Used Swing for GUI design.


 Created classes for clear separation of concerns.

3. Implementation:
 Built the application using Java programming

6.0 Actual Resources required:

S.No. Name of Resource/Material Specification Quantity


1 Computer System HCL Intel Pentium® 1
RAM 2GB
Operating System- Windows7
2 Software Notepad++ 1
JDK 1.8

3 Any other resources used Google Chrome -

7.0 Output of the Project :-

13
Basic Notepad Application
GOVERNMENT POLYTECHNIC DHARASHIV

A)Main Notepad Window

B)Creating A file on Notepad

C) Saving File –

14
GOVERNMENT POLYTECHNIC DHARASHIV

D)File save successful

E)open file to save

8.0 Skill developed/learning outcomes of Micro project :-

15
Basic Notepad Application
GOVERNMENT POLYTECHNIC DHARASHIV

 Enhanced knowledge of Java Swing for GUI development


 Improved problem-solving skills using object-oriented programming.
 Learned to design and implement user-friendly applications.

9.0 Application of the project :-


 Personal Use: Provides a simple tool for creating, editing, and saving text files for
everyday tasks.
 Educational Use: Demonstrates core Java concepts such as GUI design,
eventhandling, and file management, making it an ideal project for programming
students.
 Lightweight Text Editing: Serves as a basic alternative to more complex text editors
for quick note-taking or basic document creation.
 Learning Tool: Helps learners understand and implement event-driven programming
and file I/O operations in a practical scenario.

 Foundation for Advanced Projects: Can be expanded into more complex


applications, such as a fully-featured text editor or a collaborative writing tool .

10.0 Conclusion :-
The Basic Notepad Application successfully demonstrates the implementation of a
lightweight, user-friendly text editor using Java. It provides essential functionalities such as
creating, opening, editing, and saving text files while showcasing core programming
concepts like GUI development, event handling, and file I/O.

11.0 Future scope :-


The Basic Notepad Application can be enhanced with additional features to increase its
functionality and usability:
 Advanced Text Editing Features:Implement features like find and replace,
undo/redo, and word count.
Add support for syntax highlighting for coding purposes.
 Customization Options:Enable font customization, text formatting (bold, italic,
underline), and color themes.
 File Management Enhancements:Add options for opening multiple files in tabs.
Include recent files for quick access.

12.0 References:-

16
Basic Notepad Application
GOVERNMENT POLYTECHNIC DHARASHIV

 www.geeksforgeeks.com

 www.wikipedia.com

 www.stackoverflow.com

17

You might also like