Oopm Mini
Oopm Mini
“TEXT EDITOR”
By
Supervisor
Prof.
Department of Computer Engineering
K.C. College of Engineering and Management Studies and Research
MithBunder Road, Kopri, Thane (E)-400603
University of Mumbai
(AY 2021-22)
CERTIFICATE
This is to certify that the Mini Project entitled “TEXT EDITOR” is a bonafide work of
Mohd Faraaz (18) , Amaan Siddique (28) , Pranav Singh (31) submitted to the University
of Mumbai inpartial fulfillment of the requirement for the award of the degree of “Bachelor of
Engineering” in SE “ComputerEngineering”.
Supervisor
Prof.
This Mini Project entitled “TEXT EDITOTR” by Mohd Faraaz (18) , Amaan
Siddique (28) , Pranav Singh (31) is approved for the degree of Bachelor of
Examiners
1………………………………………
(Internal Examiner Name & Sign)
2…………………………………………
(External Examiner name & Sign)
Date:
Place:
Contents
Abstract ii
Acknowledgments iii
List of Abbreviations iv
List of Figures v
List of Tables vi
1 Introduction 1
1.1 Introduction
1.2 Motivation
1.3 Problem Statement &Objectives
1.4 Organization of the Report
2 Literature Survey 11
3.1 Introduction
3.2 Architecture/Framework
3.3 Algorithm and Process Design
3.4 Details of Hardware & Software
3.4 Experiment and Results
3.5 Conclusion and Futurework.
References 32
ABSTRACT
IntelliJ was chosen because any editor requires a good graphical interface
and IntelliJ provides that.
Our next challenge was to know all syntaxes and put them in proper
places in the source code.
ACKNOWLEDGMENT
➢ Text files used by Notepad should be not larger than 45 kb. Notepad
Cannot open a file that exceeds 54 kb inside.
And does not allow you to continue editing a fire with fire size reaches
between 45 kb and 54 kb.
Sometimes it cannot be made attractive.
And it does not have backup facility.
Sometimes it cannot edit complex code.
Functional requirements
Text Editor involves the
following functions: -
• Easy to edit any text.
• Content look more attractive and easy to read.
CONCLUSION
Application was deployed successfully in a Android
device or software system like laptop and it gives
good results as per expectations. Project can be
implemented for editing any text anywhere using
laptops. Using this system, paper work which is done
can be made more colourful, more attractive and easy
to understand.
FUTUREWORK
import java.awt.*;
import java.awt.event.*;
import java.io.*;
import java.util.*;
import javax.swing.*;
import javax.swing.event.*;
import javax.swing.filechooser.*;
JTextArea textArea;
JScrollPane scrollPane;
JLabel fontLabel;
JSpinner fontSizeSpinner;
JButton fontColorButton;
JComboBox fontBox;
JMenuBar menuBar;
JMenu fileMenu;
JMenuItem openItem;
JMenuItem saveItem;
JMenuItem exitItem;
TextEditor(){
this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
this.setTitle("SE-IT Java TextEditor");
this.setSize(500, 500);
this.setLayout(new FlowLayout());
this.setLocationRelativeTo(null);
@Override
public void stateChanged(ChangeEvent e) {
});
openItem.addActionListener(this);
saveItem.addActionListener(this);
exitItem.addActionListener(this);
fileMenu.add(openItem);
fileMenu.add(saveItem);
fileMenu.add(exitItem);
menuBar.add(fileMenu);
this.setJMenuBar(menuBar);
this.add(fontLabel);
this.add(fontSizeSpinner);
this.add(fontColorButton);
this.add(fontBox);
this.add(scrollPane);
this.setVisible(true);
}
@Override
public void actionPerformed(ActionEvent e) {
if(e.getSource()==fontColorButton) {
JColorChooser colorChooser = new JColorChooser();
Color color = colorChooser.showDialog(null, "Choose a color", Color.black);
textArea.setForeground(color);
}
if(e.getSource()==fontBox) {
textArea.setFont(new Font((String)fontBox.getSelectedItem(),Font.PLAIN,textArea.getFont().getSize()));
}
if(e.getSource()==openItem) {
JFileChooser fileChooser = new JFileChooser();
fileChooser.setCurrentDirectory(new File("."));
FileNameExtensionFilter filter = new FileNameExtensionFilter("Text files", "txt");
fileChooser.setFileFilter(filter);
if(response == JFileChooser.APPROVE_OPTION) {
File file = new File(fileChooser.getSelectedFile().getAbsolutePath());
Scanner fileIn = null;
try {
fileIn = new Scanner(file);
if(file.isFile()) {
while(fileIn.hasNextLine()) {
String line = fileIn.nextLine()+"\n";
textArea.append(line);
}
}
} catch (FileNotFoundException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
}
finally {
fileIn.close();
}
}
}
if(e.getSource()==saveItem) {
JFileChooser fileChooser = new JFileChooser();
fileChooser.setCurrentDirectory(new File("."));
if(response == JFileChooser.APPROVE_OPTION) {
File file;
PrintWriter fileOut = null;
OUTPUT