Professional Documents
Culture Documents
A Blue J (Java) Project: Siddharth Nair XII Sienna 39
A Blue J (Java) Project: Siddharth Nair XII Sienna 39
Siddharth Nair
XII Sienna
39
Acknowledgement
I Siddharth Nair of class XII would like to thank my teacher,
my parents and my brother who helped me created this
project and supported me through out. I would like to thank
my especially my computer teacher Megha Miss who gave us
a freedom of choice of topic. I would like to thank my brother
who has been of a great help.
Last but not the least I would like to thank Larry Page and
Sergey Brin who created Google, it was of a tremendous
help.
Notepad
Notepad is a simple text editor for Microsoft Windows. It has
been included in all versions of Microsoft Windows since
Windows 1.0 in 1985.Notepad is a common text-only (plain
text) editor. The resulting filestypically saved with
the .txt extensionhave no format tags or styles, making the
program suitable for editing system files that are to be used in
a DOS environment and occasionally, source code for
later compilation or execution, usually through a command
prompt. Notepad supports both left-to-right and right-to-left
based languages. Unlike WordPad, Notepad
does not treat newlines in UNIX- or Mac-style text files
correctly. Notepad offers only the most basic text manipulation
functions, such as finding text. Only newer versions of Windows
include an updated version of Notepad with a search and
replace function. However it has much less functionality in
comparison to full-scale editors.
Taking this idea I decided to make a Notepad editor in Java. It
was a tough program to create but I did take help from my
brother and referred many a books and looked up many
commands to get it working.
Before one sees the Program or screenshots one must know
what all commands and variables used in the program; so
keeping in that mind here is a list of all the commands and
variables:
Integer Variables:
int styleChoice : Gives user the choice of Style of Font
int sizeChoice : Gives user the choice of Size of Font
int findIndex:
replace that
int result:
Gives an output when quitting the
program or dialog box
int returnVal:
int I
int s
int caretPosition
String Variables
String size
String options []
String selection
String clipString
String str
Global Variables
String[] styleNames
String fontChoice
String searchString
String s2
String s1
String s
String[] styleNames = {"Plain", "Bold", "Italic", "Bold
Italic"}
String options[] = { "Save", "Don't Save", "Cancel" }
String options[] = { "Yes", "No" }
Boolean Variables:
boolean fileContentModified: It helps modifying certain
functions
KeyListener
AdjustmentListener
DocumentListener
UndoableEditListener
ChangeListener
ChangeEvents.
ItemListener
WindowListener
MouseListener
Imported Classes:
import java.awt.*;
import java.awt.event.*;
import java.awt.print.*;
import java.awt.datatransfer.*;
import java.io.*;
import java.net.*;
import java.text.MessageFormat;
import java.util.*;
import javax.swing.*;
import javax.swing.event.*;
import javax.swing.plaf.metal.*;
import javax.swing.undo.*;
import javax.swing.text.*;
import javax.print.*;
import javax.print.attribute.*;
import javax.print.attribute.standard.*;