• Objective:“JEdit” is a java based application in which the java developer can create, save and open his java files. Besides of it the users (java developer) can compile & execute their java application programs. The user has not required opening the CMD (command prompt) to compile &see the output of the java program. There is a facility in the editor to see the output in the current screen. In case of error the user can see the errors in the error pane. The user can pass the arguments in his program dynamically. The user can save the file according to his requirements.

• Scope:-

This project has been basically developed for the java application programs. We can create & save the java files. But we can not create the servlet or JSP programs by using this application. We are not able to add the server in our application. To use this application the user must has the knowledge of the JAVA language. He should know the commands for the compile and execute the java file.

2)Process description:The process description of our project is as follows:

• Class Diagram:The class diagram shows the relations between the various classes. It also shows the data members & method of every class.


• DFD of the project:The DFD of the project shows the flow the information. Briefly it shows the internal process of the project.


" such as the content pane. Files are a primary source and destination for data within many programs. because it is used by the many applets. The content pane can be obtained via the method shown here: Container getContentPane( ) 4 . such as the permissions. and the root pane. That is. files are still a central resource for storing persistent and shared information. modular design — or "modularity in design" — is an approach that subdivides a program into smaller parts (modules) that can be independently created and then used in different functions to drive multiple functionalities. Instead. time. which extends Applet. File Although most of the classes defined by java. we had used many objects to create modules. Swing Fundamental to Swing is the JApplet class.. The small description about each are given below. call add( ) for the content pane of the JApplet object. and to navigate subdirectory hierarchies. Although there are severe restrictions on their use within applets for security reasons. In our project. However. JApplet supports various "panes. do not invoke the add( ) method of the applet. JApplet is rich with functionality that is not found in Applet. For the examples in this chapter. it describes the properties of a file itself. the File class does not.. Applets that use Swing must be subclasses of JApplet. It deals directly with files and the file system. date. For example. When adding a component to an instance of JApplet. the File class does not specify how information is retrieved from or stored in files. and directory path.3)Modular Description:In programming. one difference between Applet and JApplet is important to this discussion. the glass pane.io operate on streams. A File object is used to obtain or manipulate the information associated with a disk file. we will not be using most of JApplet's enhanced features.

One of its subclasses is JTextField. In effect. instead of directly altering the components in the container. TextFields The Swing text field is encapsulated by the JTextComponent class. you indirectly add or remove components from its JRootPane instance.The JRootPane container relies on its inner class RootLayout for layout management and takes up all the space of the top-level container that holds it. In the back is the JLayeredPane. The glass pane is in front. The glass pane ensures that elements such astooltip text appear in front of any other Swing components. There are only two components within a JRootPane: a JLayeredPane and a glass pane (Component). and tends to be invisible.which contains an optional JMenuBar on top and a content pane (Container) below it in another layer. with the JRootPane doing all the work. which extends JComponent. Because the container holds only a JRootPane when you add or remove components from a top-level container. Panes Used In The Project:: JRootPane The JRootPane class acts as a container delegate for the top-level Swing containers. Its form is shown here: void add(comp) Here. It provides functionality that is common to Swing text components. It is within the content pane that you would normally place components in the JRootPane. 5 . which allows you to edit one line of text. the top-level containers are acting as proxies. comp is the component to be added to the content pane. can be any component.The add( ) method of Container can be used to add a component to a content pane.

You can use the system-defined layers.Although initially a JLayeredPane container has no layout manager. and dragging for drag-and-drop. of components within itself. The JLayeredPanemanages the z-order. there’s nothing to stop you from setting the layout property of the container. pop-up menus. 6 . or layering. defeating the layering aspect of the container. This ensures that the correct component is drawn on top of other components for tasks such as creating tooltip text.JLayeredPane The JLayeredPane serves as the main component container of a JRootPane. or you can create your own layers.

• Input: The input area allows a user to provide a response to a message. 7 . Selection of a button in this area signals the end of the usage of the JOptionPane. In addition. • Button: The button area is also for getting user input. For yes or no type questions. The sole purpose of the desktop pane is to contain a set of internal frames. The purpose of the panel is to display a message to a user and get a response from that user. with any labels you desire. Default sets of button labels are available. The response can be free form. JOptionPane JOptionPane is a special class for creating a panel to be placed in a pop-up window. the panel presents content in four areas . • Message: The primary purpose of this area is to display a text message. but you can provide your own if you need to display another icon type. they delegate most of their behavior to the desktop manager of the desktop pane. or you can display any number of buttons. • Icon: The icon area is for the display of an Icon to indicate the type of message being displayed to the user. When internal frames are contained within a desktop pane.To accomplish its task. in a text field.JDesktopPane Another class for working with groups of internal frames is the JDesktopPane class. the button area should be used instead. including none. It’s the responsibility of the installed look and feel to provide default icons for certain types of messages. or from a pick list in a combo box or list control. the area can contain any optional set of objects to make the message more informational.

JEditorPane The JEditorPane class provides the ability to display and edit multiple-attributed text. 14-point Helvetica. italics. While the JTextField and JTextArea support only single-color. as shown in Figure 8 . single-font content. right-justified paragraphs) or with the appearance of an HTML viewer. the JEditorPaneallows you to tag your content with various styles (such as bold.

shown before and after moving the divider. The divider is specially constructed in that the end user can grab it and drag the divider to adjust the size of the contained components. the JSplitPane container allows you to display components in a single row or column.JSplitPane Similar to the Box container. The components are of variable size and separated by a movable divider. Figure demonstrates both vertical and horizontal split panes. Whereas a Box can contain any number of components. 9 . a JSplitPane is meant to display two—and only two—components.

Using JTabbedPane is like using the CardLayout manager. JScrollPane 10 . The JTextPane relies on three interfaces for the setting of text attributes: AttributeSet for a basic collection of attributes. JTabbedPane is a full-fledged Container. In case you’re not familiar with property sheets. It differs from the JEditorPane only in its manner of providing the content to display because the text isn’t tagged with the styles as it would be in an HTML or RTF document.2 version of the Swing classes. MutableAttributeSet for a changeable collection of attributes. While CardLayout is a LayoutManager. Figure shows a set of tabs from the original SwingSet demo that comes with the JDK 1. JTabbedPane The JTabbedPane class represents the ever-popular property sheet to support input or output from multiple panels within a single window in which only one panel is shown at a time. or tabbed panes (all alternate names for the same thing). tabbed dialog boxes.JTextPane The JTextPane is a specialized form of the JEditorPane designed especially for the editing (and display) of styled text. and Style for a set of attributes to be associated with a part of a StyledDocument. except with added support for changing cards built in.

and other components necessary for you to run applets and applications written in the Java programming language. 4)Requirement Specifications:Technologies: JRE and JDK: Sun Microsystems provides two principal software products in the JavaTM 2 Platform Standard Edition (J2SETM) family: J2SE Runtime Environment (JRE): The JRE provides the libraries. This runtime environment can be redistributed with applications to make them free-standing. J2SE Development Kit (JDK): 11 .Swing’s JScrollPane container provides for the display of a large component within a smaller display area. with scrolling support (if necessary) to get to the parts currently invisible. Java virtual machine. in which the large component is a JLabel with an ImageIconon it. Figure shows one such implementation.

It is normally compiled to the bytecode instruction set and binary format defined in the Java Virtual Machine Specification. concurrent. Java Programming Language: The Java Programming Language is a general-purpose. and more. wrapper classes for primitive types. Java Virtual Machines: The Java virtual machine is an abstract computing machine that has an instruction set and manipulates memory at run time. javax. strongly typed.The JDK includes the JRE plus command-line development tools such as compilers and debuggers that are necessary or useful for developing applets and applications.class-based object-oriented language. The Java 2 Platform Standard Edition provides two implementations of the Java virtual machine (VM): Base Libraries: Classes and interfaces that provide basic features and fundamental functionality for the Java platform.and operating system-independence. a basic math class. The Java virtual machine is ported to different platforms to provide hardware. Lang and Util Packages: Provides the fundamental Object and Class classes.swing Package: Provide the object and classes for developing interactive GUI 12 .

buttons. Swing: The Swing APIs also provide graphical component (GUI) for use in user interfaces. text fields. checkboxes. In 1. a new I/O (NIO) API was introduced that provides new features and improved performance. The Swing APIs are written in the Java programming language without any reliance on code that is specific to the GUI facilities provided by underlying operating system. User Interface Libraries: AWT: The JavaTM platform's Abstract Windowing Toolkit (AWT) provides APIs for constructing user interface components such as menus.4. This allows the Swing GUI components to have a "pluggable" look-and-feel that can be switched while an application is running. VM Tool Interface: 13 . dialog boxes. AWT allows for rendering of simple shapes such as ovals and polygons and enables developers to control the user-interface layout and fonts used by their applications.Other Base Packages: I/O: I/O functionality provides for system input and output through data streams.. In addition. serialization and the file system. and for handling user input through those components. Tool Specifications: Debugger Architecture: Architecture and specifications for use by debuggers in development environments.

4 GHz Language Runtime Environment JAVA Jre 1.The Java Virtual Machine Tool Interface (JVM TI) is a specification for inspecting the state and controlling the execution of applications running in the JVM. Javadoc Tool: Javadoc is a tool that parses the declarations and documentation comments source files to produce a set of HTML pages describing the program elements. apt. The Java Virtual Machine Profiler Interface (JVMPI) has been deprecated. jdb. appletviewer. Covers basic tools (javac . Hardware and Software specification: Hardware Processor RAM Pentium II (32 or 64 64 MB bit)at 233 MHz or Celeron 2. and the Solaris operating systems. The Doclet API provides a mechanism for clients to inspect the source-level structure of programs and libraries. extcheck) and security tools. javadoc . java. jar. Linux. java. javap. JDK Tools & Utilities: Documentation for the tools and utilities included in the JDK. jar.4 and above JAVA Swing Disk Space 1 GB Tools Javac. Platforms: Sun provides implementations of the JDK and Java Runtime Environment for Microsoft Windows. including javadoc comments embedded in the source. This API can be used by doclets to generate documentation. javah.. javap Software User interface Limitations: 14 .

• To run this application jvm must be installed on your system. l=new JLabel("enter java prog"). • Testing and debugging features are not available.io. EJBs etc. JTextField tf.80.150.30). • Help window not provide.swing.*.). tf=new JTextField(100). import java.setBounds(160. public Editor() { f=new JFrame("MyEditor"). tf. b1=new JButton("Run").setBounds(50.awt. JLabel l.b1.*.50.25).100. import java.• Not capable to run web projects (Servlets. • Users have to compile and run project manually . JScrollPane js. b. JTextArea ta. 15 .event.*.*.awt. JButton b. public class Editor implements ActionListener{ JFrame f. import javax. l.25). 5) Coding Editor Class: import java. b=new JButton("Compile"). • Support application developed in java not any other language. JSPs.50.setBounds(50.320. IDE will not be doing it automatically as a backend process.

String fname=tf. js. b.ScrollPaneConstants.60).add(tf). else { ta.setBounds(20. s=di.100.450.setText("Compilation Successful"). js=new JScrollPane(ta. Container c=f.addActionListener(this).getErrorStream().di1.setBounds(350. c.getContentPane().HORIZONTAL_SCROLLBAR_ALWAYS). c. c. c.add(b). DataInputStream di.30).addActionListener(this).400).getRuntime(). } public void actionPerformed(ActionEvent ae) { String str=ae. c.java".320. if(str.readLine().200).bf1.setText(s).80.b1.getText().setLayout(null). f.add(l). String s="". if(s==null) ta. Process p=r. f.exec(name). di=new DataInputStream(bf).VERTICAL_SCROLLBAR_ALWAY S. InputStream bf.ScrollPaneConstants.setVisible(true). try { Runtime r=Runtime.add(b1). ta=new JTextArea(250. b1. c.getActionCommand().equals("Compile")) { String name="javac "+fname+". while(s!=null) { 16 . bf=p.setSize(500.add(js).

setText(stt). } } } } catch(Exception e){} } public static void main(String args[]) { new Editor(). if(s!=null) ta. ta. if(s!=null) {ta.readLine().setText(s).getInputStream().readLine(). if(s!=null) ta. di=new DataInputStream(bf).readLine().append("\n"+s). 17 .append(stt+"/n"). bf=p.} } } else { String name="java "+fname. s=di.exec(name). while(stt!=null) { stt=di1.s=di. if(stt!=null) ta. while(s!=null) { s=di. Process p=r.getErrorStream().readLine().} } else { bf1=p.readLine(). di1=new DataInputStream(bf1).append("\n"+s). String stt=di1.

m1=new JMenu("File").im22. JMenuItem im1.jp3. JSplitPane jsp1.swing. import javax.16).getContentPane(). import javax.Font.im2.j. Container c=jf.event.s1.m2.16).PLAIN. jfc=new JFileChooser("E:").*. Font f5=new Font("calibri".PLAIN.im21.*. import java.jp5. File f.jt2. JTextPane jp1.io. Font f2=new Font("arial".} } IDE Class: import java.swing. m=new JMenuBar().Font.jp4. public IDE() { jf=new JFrame("DEVELOPMENT ENVIORNMENT"). JScrollPane js1. public class IDE implements ActionListener { JFrame jf.16). JFileChooser jfc.*. Font f3=new Font("calibri". Font f1=new Font("serif".jsp2.PLAIN.PLAIN. import java.awt.js3. jf. JTabbedPane jt1.Font.im5.js2.PLAIN.im3. JMenuBar m.jp2.awt.Font. JMenu m1.a.16). int i.setLayout(null).jsp3.jt3. Font f4=new Font("calibri". m2=new JMenu("Build").*.20).Font. String fn. 18 .filechooser. im1=new JMenuItem("New").*.im4.

addActionListener(this).add(im5).green).setFont(f3). jp3=new JTextPane().red). jp5. m. jp1.setFont(f4).addActionListener(this).addActionListener(this). jp3. jp3.setForeground(Color.addActionListener(this).blue). im21=new JMenuItem("Compile"). jp4=new JTextPane(). jp2. jp2. jp4.add(im1).addActionListener(this).add(im22).add(im4). m1.setForeground(Color. m1.addActionListener(this).add(im21).magenta).setForeground(Color.setEditable(false).setFont(f2). m1. m. im3=new JMenuItem("Save"). m1.addActionListener(this). m2.red). im22. jp4. im3.setForeground(Color.add(im3). jp5. jp2.setFont(f5). im21. m1. 19 .setJMenuBar(m).add(m2). m2. im22=new JMenuItem("Run"). jp5=new JTextPane().im2=new JMenuItem("Open"). jp1=new JTextPane(). jf. im5=new JMenuItem("Exit"). im2. jp1.add(m1). jp2=new JTextPane().setForeground(Color. im4.setFont(f1).add(im2). im1. im4=new JMenuItem("Save As"). im5.

20 .addTab("Arguements".setDividerLocation(500). jf.EXIT_ON_CLOSE).jp3.js3. jt2. jt2. jt2. jsp1=new JSplitPane(JSplitPane.setEditable(false).addTab("File". jsp1. jt1. jp4.jp5). jf.750). } public void actionPerformed(ActionEvent e) { String label=e. jt3.js2). c.setBounds(0. } public static void main(String a[]) { IDE i=new IDE().add(jsp2).670).setEditable(false). jt3=new JTabbedPane(). jp5.equals("Open")) open().jp2).getActionCommand().0. jt2=new JTabbedPane().1350. jf.js1. jsp2.addTab("Error".setDividerLocation(200).jp1). js3=new JScrollPane(jt3).addTab("Console".jp3). jt1=new JTabbedPane(). jsp2=new JSplitPane(JSplitPane. js2=new JScrollPane(jt2).jsp1).VERTICAL_SPLIT. else if(label.jp4).addTab("Explorer". if(label.HORIZONTAL_SPLIT.setVisible(true).setEditable(false). jsp2.equals("New")) now().setSize(1400.setDefaultCloseOperation(WindowConstants. js1=new JScrollPane(jt1).

showSaveDialog(jf).getSelectedFile()..equals("Run")) run(). } public void now() { } public void save() { int r1=jfc. Thread t=new Thread(r). else if(label.. if(r1==JFileChooser. 21 . else compile().getSelectedFile().APPROVE_OPTION) { f=jfc.. if(r1==JFileChooser. } else jp2. fn=f.setText(" Exception Occurs...start().exit(0).equals("Save As")) saveAs(). else if(label.getName().equals("Save")) save().equals("Exit")) System.. Runnable r =new MyThread2(jp1.APPROVE_OPTION) { f=jfc.showOpenDialog(jf). t."+"\n"+"Unable to open the Requested File ").f). } public void open() { int r1=jfc.else if(label. else if(label.

start(). Runnable r=new MyThread1(jp1. } } public void compile() { try { Runnable r6=new MyThread6(jp2. } public void saveAs() { } public void run() { try{ Runnable r5=new MyThread3(jp2. } else jp2.fn..f).getName()..setText(e. 22 ..setText(e.f.toString()).fn=f..jp2. }catch(Exception e) { jp2. } } } class MyThread1 implements Runnable { JTextPane jp1. Thread t6=new Thread(r6).. Thread t5=new Thread(r5). t.toString()).start().start(). Thread t=new Thread(r)."+"\n"+"Unable to open the Requested File ").. t6. t5. }catch(Exception e) { jp2.jp2).setText(" Exception Occurs.f).

jp1=jp1. this.i<ch. } public void run() { try{ DataInputStream fin=new DataInputStream(new FileInputStream(f.write(ch[i]).getText(). MyThread2(JTextPane jp1.File f. FileOutputStream fout=new FileOutputStream(f.getBytes().i++) fout.toString()). MyThread1(JTextPane jp1.jp1=jp1. byte ch[]=s.i. String s.f=f.setText(e. for(int i=0. 23 .length. } } } class MyThread2 implements Runnable { JTextPane jp1. this. this. }catch(Exception e) { jp2.File f) { this. fout.File f. File f.close(). } public void run() { try{ String s=jp1.toString()).toString())).jp2=jp2.JTextPane jp2) { this.f=f.

File f.fn=fn. fin.String fn. }catch(Exception e){ j. for(i=0.s2.s2. s1="javac "+s1. String s1. a.i++) if(fn.setText(e.f=f.readLine())!=null) { s=s+i+"\n".i<=fn. this.setText(e.File f) { this.fn.substring(0. } jp1. ABC a=new ABC(s1.toString(). this.setText(s).toString()). int i=0.close().i).j=j.maina().') break. }catch(Exception e) { jp1.j). } public void run() { try{ s1=f.s="". fn=fn. while((i=fin.length(). MyThread3(JTextPane j. 24 . } } } class MyThread3 implements Runnable { JTextPane j.charAt(i)=='. s2="java "+fn.toString()).

this. } } } AA class: import javax. MyThread6(JTextPane j. aa. s1="javac "+s1. AA aa=new AA(s1.j=j.io.*.f=f.sun(). JTextPane j.} } } class MyThread6 implements Runnable { JTextPane j.File f) { this. this. import java.*. }catch(Exception e){ j.toString()).j=j.s1=s1.JTextPane j) { this.swing. public AA(String s1.toString(). } public void sun() throws IOException 25 . } public void run() { try{ s1=f.setText(e. File f. String s1.j). public class AA { String s1.

while((a=din.p).swing. public class BB { JTextPane jp. this.setText(s).jp=jp.*.a.p=p. } } ABC Class: 26 .*.readLine())!=null) s=s+a+"\n".Process p) { this. } } BB Class: import javax.getErrorStream()). DataInputStream din. b. BB b=new BB(j. String s.io.{ Runtime r=Runtime. public BB(JTextPane jp. if(s!=null) { s=s+"\n". } jp. } void yield() throws IOException { din=new DataInputStream(p.exec(s1). s=din. import java. Process p=r.getRuntime(). } else { s="Compilation Successful \n\n".readLine(). Process p.yield().

JTextPane j) { this.*.getRuntime().io.p1. public BCD(JTextPane jp.p=p. public ABC(String s1. String s. import java. } void play() throws IOException { 27 .a. BCD b=new BCD(j.*.s2.swing.getRuntime(). JTextPane j.exec(s2).s1=s1.jp=jp.s2=s2. public class BCD { JTextPane jp. this. String s1.play(). } } BCD Class: import javax.*.*.io. } public void maina() throws IOException { p1=Runtime.swing. DataInputStream din. public class ABC { Process p.j=j.String s2. this.Process p) { this. p=Runtime. this.p). import java.exec(s1). Process p. b.import javax.

28 .getInputStream()).  To purpose of system testing is to check and find out these errors or faults as early as possible so losses due to it can be saved.  Testing is not a distinct phase in system development life cycle but should be applicable throughout all phases i. s=din.readLine())!=null) s=s+a+"\n". din=new DataInputStream(p. It is a process of evolution of system or its parts by manual or automatic means to verify that it is satisfying specified or requirements or not.  Testing is the fundamental process of software success. if(s!=null) { s=s+"\n". while((a=din. time constraints. no system is perfect due to communication problems between user and developer.getErrorStream()).e.readLine())!=null) s=s+a+"\n". } else { s="". or conceptual mistakes by developer. } jp.setText(s).din=new DataInputStream(p. design development and maintenance phase.readLine(). while((a=din.  Generally.}} 6) Testing & Debugging  Software testing is the process of executing a program with intension of finding errors in the code.

e.i. So a great consideration is required for checking for quality of software. are we using the correct procedure for the development of software so that it can meet the user requirements.  SOFTWARE RELIABILTY ESTIMATION:.The objective is to discover the residual designing errors before delivery to the customer. Testing is used to show incorrectness and considered to success when an error is detected.The computer and the software are mainly used for complex and critical applications and a bug or fault in software causes severe losses. • Validation means to check whether we are building the right product or not. Some important principles of software testing are as given:29 . PRINCIPLES OF SOFTWARE TESTING  Software testing is an extremely creative and challenging task.  VERIFICATION AND VALIDATION:• Verification means to test that we are building the product in right way . The failure data during process are taken down in order to estimate the software reliability. OBJECTIVES OF SOFTWARE TESTING: The software testing is usually performed for the following objectives:-  SOFTWARE QUALITY IMPROVEMENT:.

• Testing should begin in “in the small” and progress towards testing “in the large”. • Testing time and resources should be limited i. • Document test cases and test results. avoid redundant testing. • Examining what the software not doing which it expected to do and also checking what it is doing that was not expected to do. • Keep software static (without change mean while) during test. • Test should be planned long before testing begins i. • It is impossible to test everything. • Use effective resources to test. • Test for invalid and unexpected input conditions as well as valid conditions.• All tests should be traceable to customer requirements.e.e. after requirement phase. STRATEGY FOR SOFTWARE TESTING 30 . • For the most effective testing should be conducted by an independent party.

In this testing. These tests fall outside scope of software process and are not conducted solely by software engineers. In this testing. • Third level is integration testing. It focuses on verification efforts. • The first level is unit testing. 7) Conclusion:Though the system still containing lot of scope of improvement in it. • The second level is integration testing. The good here is to see if the modules can be integrated properly. There is no bach end in the project. each level of testing aims to test different aspects of the system. System testing is actually a series of different tests whose primary purpose is to fully exercise computer based system. It is a systematic technique for constructing the program structure. There is no process in the project in the which is going on at backend like other java editors. 31 . individual components are tested to ensure that they operate correctly. But its overall look and feel gives rough picture of on existing automation system.Different levels of testing are used in the test process. many tested modules are combined into the subsystem which are then tested.

32 .

33 .

Master your semester with Scribd & The New York Times

Special offer for students: Only $4.99/month.

Master your semester with Scribd & The New York Times

Cancel anytime.