0% found this document useful (0 votes)
19 views

PM Shri School Jawahar Navodaya Vidyalaya Palghar

Uploaded by

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

PM Shri School Jawahar Navodaya Vidyalaya Palghar

Uploaded by

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

PM SHRI SCHOOL

JAWAHAR NAVODAYA VIDYALAYA


PALGHAR
INFORMATION TECHNOLOGY(802)
2024-25
A PROJECT ON: NOTEPAD APP
UNDER THE GUIDANCE OF:
MRS.BHAGYSHRI CHAMLE (FCSA)
CERTIFICATE
This is to certify that the project work on
“NOTEPAD APP” based on the curriculum of
CBSE has been completed by Ms.ANSHIKA
KRISHNADATT UPADHYAY student of Class XII
of PM SHRI SCHOOL JAWAHAR NAVODAYA
VIDYALAYA PALGHAR. The above mentioned
project work has been completed under my
guidance during the academic year 2024-25.

Internal Examiner
(Subject Teacher)

External Examiner Principal


JNV Palghar
AKNOWLEDGEMENT
I want to express my sincere gratitude to my
teacher Mrs. Bhagyshri Chamle (FCSA) for her
encouragement, insightful suggestions and
mentorship. I also like to extend my gratitude
to our School Principal, Mr.Abraham George for
granting me this wonderful opportunity to be
the part of this project.

I would also like to express my appreciation to


all those who have supported and contributed
to the completion of this project. Also I want to
thank my family and friends for their
understanding and support during this project.

ANSHIKA KRISHNADATT UPADHYAY


NOTEPAD
ABSTRACT:
This abstract introduces a simple note-making application
designed for streamlined organization and accessibility.

The app offers users a user-friendly interface for creating,


storing and categorzing notes, enabling quick retrieval and
editing.

Its minimalist design prioritizes ease of use, allowing


individuals to jot down ideas, tasks and reminders
effortlessly while facilitating efficient note management
through intuitive features and straightforward navigation.
NOTEPAD
SOURCE CODE:
import javax.swing.*;
import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.io.*;
import java.util.ArrayList;

public class NoteTakingApp extends JFrame {


private JTextArea textArea;
private JFileChooser fileChooser;
private ArrayList<String> notes;

public NoteTakingApp() {
setTitle(“Note Taking App”)
setSize(500,500);
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

textArea = new JTextArea();


JScrollPane scrollPane = new JScrollPane(textArea);
add(scrollPane, BorderLayout.CENTER);

notes = new ArrayList<>();


fileChooser = new JFileChooser();

JMenuBar menuBar = new JMenuBar();


JMenu fileMenu = new JMenu(“File”);
JMenuItem saveItem = new JMenultem(“Save”);
JMenuItem loadItem = new JMenuItem(“Load”);
saveItem.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
saveToFile();
}
})(;

loadItem.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
loadFromFile();
}
});

fileMenu.add(saveItem);
fileMenu.add(loadItem);
menuBar.add(fileMenu);

setJMenuBar(menuBar);
setVisible(true);
}

private void saveToFile() {


int returnVal = fileChooser.showSaveDialog(this);
if (returnVal == JFileChooser.APPROVE_OPTION) {
File file = fileChooser.getSelectedFile();
try (PrintWriter writer = new PrintWriter(file)) {
writer.println(textArea.getText());
writer.close();
} catch (IOException e) {
e.printStackTrace();
}
}
}

private void loadFromFile() {


int returnVal = fileChooser.showOpenDialog(this);
if (returnVal == JFileChooser.APPROVE_OPTION) {
File file = fileChooser.getSelectedFile();
try (BufferedReader reader = new BufferedReader(new
FileReader(file))) {
String line;
StringBuilder content = new StringBuilder();
while ((line = reader.readLine()) != null) {
content.append(line).append(“\n”);
}
textArea.setText(content.toString());
reader.close();
} catch (IOException e) {
e.printStackTrace();
}
}
}

public static void main(String[] args) {


SwingUtilities.invokeLater(new Runnable() {
public void run() {

new NoteTakingApp();
}
});
}
}
NOTEPAD

BIBLIOGRAPHY:
1. https://www.w3schools.com
2. www.geeksforgeeks.org
3. https://www.youtube.com
4. https://netbeans.apache.org
5. https://www.google.co.in
THANK YOU!

You might also like