The document describes developing a programmer's editor in Java that supports various features like syntax highlighting, compilation support, and debugging support. It provides algorithms and procedures for implementing syntax highlighting, compilation, debugging, tool tips, and a task manager. The program code provided implements these features in a Java GUI application with menus, buttons, text areas for code editing and output, and listeners for user interactions like key presses.
Download Complete Material - https://www.instamojo.com/prashanth_ns/
This VB.Net 4.0 with ADO.NET Programming contains 15 Units and each unit contains 40 to 60 slides in it.
Contents…
• Appreciate the Graphical User Interface (GUI)
• Identify the controls of GUI
• Identify the features of .NET Framework
• Use Windows project by using Visual Studio .NET integrated development environment
• Work with Windows Forms and Controls
• Perform drag-and-drop operations using clipboard
• Validate user input using controls and events
• Work with the CommonDialog class
• Create a custom dialog box
• Work with menus and MDI applications
• Work with ToolStrip control
• Identify the functionality of print components
• Identify the functionality of Crystal Reports
• Implement accessibility features in a .NET application
• Identify features of international applications
• Implement globalization and localization in a .NET application
• Create a help system using HTML Workshop
• Implement help system in .NET applications
• Work with built-in components in the .NET applications
• Work with user-defined components in the .NET applications
• Implement asynchronous programming
• Use the BackgroundWorker component
• Implement assemblies
• Implement various deployment strategies
• Use various editors in a deployment project
• Implement ClickOnce
• Configure and Secure a Windows application
ADO.NET 4.0 Architecture
• Work with XML
• Work with SQL queries
• Implement data binding to display values on the controls of a Windows form
• Filter the data to display the selected records
• Identify the connected and disconnected environment in ADO.NET
• Working in a connected environment
• Working in a disconnected environment
THIS PPT CONTAINS THE DETAILS ABOUT THE VARIOUS LANGUAGE PROCESSORS/LANGUAGE TRANSLATORS- THE COMPILER & THE INTERPRETER, OPERATING SYSTEMS & ITS FUNCTION, PARALLEL & CLOUD COMPUTING
Object Oriented Programming -- Dr Robert Harlesuthi
This course absorbs what was “Programming Methods” and provides a more formal look at Object Oriented programming with an emphasis on Java
Four Parts ---
1. Computer Fundamentals
2. Object-Oriented Concepts
3. The Java Platform
4. Design Patterns and OOP design examples
OBJECT ORIENTED PROGRAMMING LANGUAGE - SHORT NOTESsuthi
Short Notes on OOP
Object-oriented programming (OOP) is a programming paradigm based on the concept of "objects", which can contain data, in the form of fields (often known as attributes or properties), and code, in the form of procedures (often known as methods). A feature of objects is an object's procedures that can access and often modify the data fields of the object with which they are associated (objects have a notion of "this" or "self"). In OOP, computer programs are designed by making them out of objects that interact with one another. OOP languages are diverse, but the most popular ones are class-based, meaning that objects are instances of classes, which also determine their types.
Download Complete Material - https://www.instamojo.com/prashanth_ns/
This VB.Net 4.0 with ADO.NET Programming contains 15 Units and each unit contains 40 to 60 slides in it.
Contents…
• Appreciate the Graphical User Interface (GUI)
• Identify the controls of GUI
• Identify the features of .NET Framework
• Use Windows project by using Visual Studio .NET integrated development environment
• Work with Windows Forms and Controls
• Perform drag-and-drop operations using clipboard
• Validate user input using controls and events
• Work with the CommonDialog class
• Create a custom dialog box
• Work with menus and MDI applications
• Work with ToolStrip control
• Identify the functionality of print components
• Identify the functionality of Crystal Reports
• Implement accessibility features in a .NET application
• Identify features of international applications
• Implement globalization and localization in a .NET application
• Create a help system using HTML Workshop
• Implement help system in .NET applications
• Work with built-in components in the .NET applications
• Work with user-defined components in the .NET applications
• Implement asynchronous programming
• Use the BackgroundWorker component
• Implement assemblies
• Implement various deployment strategies
• Use various editors in a deployment project
• Implement ClickOnce
• Configure and Secure a Windows application
ADO.NET 4.0 Architecture
• Work with XML
• Work with SQL queries
• Implement data binding to display values on the controls of a Windows form
• Filter the data to display the selected records
• Identify the connected and disconnected environment in ADO.NET
• Working in a connected environment
• Working in a disconnected environment
THIS PPT CONTAINS THE DETAILS ABOUT THE VARIOUS LANGUAGE PROCESSORS/LANGUAGE TRANSLATORS- THE COMPILER & THE INTERPRETER, OPERATING SYSTEMS & ITS FUNCTION, PARALLEL & CLOUD COMPUTING
Object Oriented Programming -- Dr Robert Harlesuthi
This course absorbs what was “Programming Methods” and provides a more formal look at Object Oriented programming with an emphasis on Java
Four Parts ---
1. Computer Fundamentals
2. Object-Oriented Concepts
3. The Java Platform
4. Design Patterns and OOP design examples
OBJECT ORIENTED PROGRAMMING LANGUAGE - SHORT NOTESsuthi
Short Notes on OOP
Object-oriented programming (OOP) is a programming paradigm based on the concept of "objects", which can contain data, in the form of fields (often known as attributes or properties), and code, in the form of procedures (often known as methods). A feature of objects is an object's procedures that can access and often modify the data fields of the object with which they are associated (objects have a notion of "this" or "self"). In OOP, computer programs are designed by making them out of objects that interact with one another. OOP languages are diverse, but the most popular ones are class-based, meaning that objects are instances of classes, which also determine their types.
Each technological age has been marked by a shift in how the industrial platform enables companies to rethink their business processes and create wealth. In the talk I argue that we are limiting our view of what this next industrial/digital age can offer because of how we read, measure and through that perceive the world (how we cherry pick data). Companies are locked in metrics and quantitative measures, data that can fit into a spreadsheet. And by that they see the digital transformation merely as an efficiency tool to the fossil fuel age. But we need to stretch further…
Introduction
Difference between System software and Application software
Difference between System and Application programming
Elements of programming environment
Assembler
Loader and Linker
Macro preprocessor
Compiler
Editor
Debugger
Device Drivers
Operating System
Top 10 IDEs for React.js Developers in 2021WrapPixel
Are you a React developer feeling frustrated by using that same old code editor every day and now want to explore some new and unheard editors?
Using a code editor or an IDE that has a sufficient amount of features you need and that fits perfectly into your own workflow is important for the entire work. In this article, we have compiled the top 10 IDEs and editors on which you can get your hands as a React developer with ample support for the JavaScript ecosystem and the features they provide.
The French Revolution, which began in 1789, was a period of radical social and political upheaval in France. It marked the decline of absolute monarchies, the rise of secular and democratic republics, and the eventual rise of Napoleon Bonaparte. This revolutionary period is crucial in understanding the transition from feudalism to modernity in Europe.
For more information, visit-www.vavaclasses.com
Read| The latest issue of The Challenger is here! We are thrilled to announce that our school paper has qualified for the NATIONAL SCHOOLS PRESS CONFERENCE (NSPC) 2024. Thank you for your unwavering support and trust. Dive into the stories that made us stand out!
Ethnobotany and Ethnopharmacology:
Ethnobotany in herbal drug evaluation,
Impact of Ethnobotany in traditional medicine,
New development in herbals,
Bio-prospecting tools for drug discovery,
Role of Ethnopharmacology in drug evaluation,
Reverse Pharmacology.
How to Make a Field invisible in Odoo 17Celine George
It is possible to hide or invisible some fields in odoo. Commonly using “invisible” attribute in the field definition to invisible the fields. This slide will show how to make a field invisible in odoo 17.
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdfTechSoup
In this webinar you will learn how your organization can access TechSoup's wide variety of product discount and donation programs. From hardware to software, we'll give you a tour of the tools available to help your nonprofit with productivity, collaboration, financial management, donor tracking, security, and more.
Palestine last event orientationfvgnh .pptxRaedMohamed3
An EFL lesson about the current events in Palestine. It is intended to be for intermediate students who wish to increase their listening skills through a short lesson in power point.
2024.06.01 Introducing a competency framework for languag learning materials ...Sandy Millin
http://sandymillin.wordpress.com/iateflwebinar2024
Published classroom materials form the basis of syllabuses, drive teacher professional development, and have a potentially huge influence on learners, teachers and education systems. All teachers also create their own materials, whether a few sentences on a blackboard, a highly-structured fully-realised online course, or anything in between. Despite this, the knowledge and skills needed to create effective language learning materials are rarely part of teacher training, and are mostly learnt by trial and error.
Knowledge and skills frameworks, generally called competency frameworks, for ELT teachers, trainers and managers have existed for a few years now. However, until I created one for my MA dissertation, there wasn’t one drawing together what we need to know and do to be able to effectively produce language learning materials.
This webinar will introduce you to my framework, highlighting the key competencies I identified from my research. It will also show how anybody involved in language teaching (any language, not just English!), teacher training, managing schools or developing language learning materials can benefit from using the framework.
We all have good and bad thoughts from time to time and situation to situation. We are bombarded daily with spiraling thoughts(both negative and positive) creating all-consuming feel , making us difficult to manage with associated suffering. Good thoughts are like our Mob Signal (Positive thought) amidst noise(negative thought) in the atmosphere. Negative thoughts like noise outweigh positive thoughts. These thoughts often create unwanted confusion, trouble, stress and frustration in our mind as well as chaos in our physical world. Negative thoughts are also known as “distorted thinking”.
The Indian economy is classified into different sectors to simplify the analysis and understanding of economic activities. For Class 10, it's essential to grasp the sectors of the Indian economy, understand their characteristics, and recognize their importance. This guide will provide detailed notes on the Sectors of the Indian Economy Class 10, using specific long-tail keywords to enhance comprehension.
For more information, visit-www.vavaclasses.com
Sectors of the Indian Economy - Class 10 Study Notes pdf
Ex11 mini project
1. Elanthendral.M (HDCA)
11.Develop a programmer’s editor in java that supports
syntaxhighlighting, compilation support ,debugging
support,ect…
Aim :-
To Develop a programmer’s editor in java that supports Syntax Highlighting ,
compilation support , Debugging support.
Algorithm:-
I Syntax Highlighting
1.1 Definition:-
Definition
Syntax highlighting is a feature of some text editors, that display text-
especially Source code in different colors and fonts according to the
category of terms.
1.2 Introduction:-
i. This feature eases writing in a structured language such as a
programming language or a markup language as both structures and
syntax error are visually distinct.
ii. Highlighting does not affect the meaning of the text itself; it’s made only for
human readers/editors
iii. Syntax highlighting is a form of secondary notation, since the highlights are
not part of the text meaning, but serve to reinforce it. Some editor also integrate
syntax highlighting with other features, such Highlighting with other features ,
such as spell checking or code folding , as aids to editing which are
external to the language.
1.3 Procedure:-
i. Create a repository of sorts that would store all of the style changes that must
be made to the document, and when the write lock is lifted , perform the
changes. I’ve made the repository , and I’ve tried to make the changes just
before painting the control , but that doesn’t work .Can anyone suggest a better
time to perform the changes?
2. ii. Start up a new thread that waits for the write lock to be lifted , and , when it is
performs the changes . I’m not extremely familiar with threading in java ,
through , so anyone who wants to give me a solution using this method need to
be very explicit and verbose.
iii. Any other simple way that doesn’t involve using something other than
JTextArea.
II Compilation
2. 1 Definition:-
i. A compiler is a computer program (or set of programs) that transforms
source code written in a programming language (the source language) into
another computer language (the target language, often having a binary form
known as object code). The most common reason for wanting to transform
source code is to create an executable program
ii. Translate a (high level) language program into an equivalent assembly language
program.
2.2Java compilation
i. Source code java is compiled into “bytecode” instead of machine code.
ii. bytecode is executed by the virtual machine , it is device independent.
iii. Bytecode : assembly + types + object oriented layer.
2.3 Introduction:-
2.4Two main parts the compilation
i. To understand the program.
ii. To translate it into machine code.
2.4.1 Understanding programs
Procedure :-
At the beginning a program is just a text:
i. Cut the sequence into words(lexical analysis)
ii. Organize words into sentences(syntactic analysis,parsing)
iii. Encodes the meaning of sentences
Close to the understanding of natural languages , for natural language , start with a
flow of sounds
3. 2.4.2 Generate machine programs
Procedure :-
i. Produce machine code realizing the original program.
ii. Decompose complex abstract operations of the program into
sequences of simple , basic machine instruction.
iii. Optimize the program.
III Debugging :-
3. Definition:-
A Degugger or Debugging tool is a computer program that is used to test and
debug other programs (the “target” program ). The code to be examined
might alternatively be running on an instruction set simulator(ISS), a
technique that allows great power in its ability to halt when specific
conditions are encountered but which will typically be somewhat slower
than executing slower than executing the code directly on the appropriate
(or the same). Some debugger offer two modes of operation – full or partial
simulation , to limit this impact.
IV Tool Tips:-
i. Creating a tool tip for any Jcomponent object is easy .use the
Picture Picture name Tooltip name
NEW new.gif
Open open.gif
Save save.gif
Copy copy.gif
Cut cut.gif
Past past.gif
setToolTipText method to set up a tool tip for the component .
ii. In this program we use the this type of the ToolTip;
4. V Task Manager
In this project we use task manager
5.1 how to get the running applications in windows task manager using
java
Why are you doing System type stuff using Java? It is not designed for it. If you
want a command line command to get the "application" list that appears
in TaskManager
5.2 What is task manager:-
i. Task Manager provides information about programs and processes running on
your computer. It also displays the most commonly used performance measures
for processes.
5. ii. You can use Task Manager to monitor key indicators of your computer's
performance. You can see the status of the programs that are running and end
programs that have stopped responding. You can also assess the activity of
running processes using as many as fifteen parameters, and see graphs and data
on CPU and memory usage.
iii. In addition, if you are connected to a network, you can view network status and
see how your network is functioning.
iv. If you have more than one user connected to your computer, you can see who is
connected, what they are working on, and you can send them a message.
5.3 Programs that are running
i. The Applications tab shows the status of the programs running on your
computer.
ii. On this tab, you can end, switch to, or start a program.
5.4 Processes that are running
i. The Processes tab shows information about the processes running on your
computer.
ii. For example, you can display information on CPU and memory usage, page faults,
handle count, and a number of other parameters.
5.5 Performance measures
The Performance tab displays a dynamic overview of your computer's
performance, including:
i. Graphs for CPU and memory usage.
ii. Totals for the number of handles, threads, and processes running on
your computer.
iii. Totals, in kilobytes, for physical, kernel, and commit memory.
5.6 Viewing Network performance
i. The Networking tab displays a graphical representation of network
performance. It provides a simple, qualitative indicator that shows the status of
the network(s) that are running on your computer. The Networking tab is
displayed only if a network card is present.
ii. On this tab, you can view the quality and availability of your network
connection, whether you are connected to one or more than one network.
6. 5.7Monitoring Sessions
i. The Users tab displays users who can access this computer, and session status
and names. Client Name specifies the name of the client computer using the
session, if applicable. Session provides a name for you to use to perform such
tasks as sending another user a message or connecting to another user’s session.
ii. The Users tab is displayed only if the computer you are working on has Fast User
Switching enabled, and is a member of a workgroup or is a standalone computer.
The Users tab is unavailable on computers that are members of a network domain.
Program :-
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import java.io.*;
/**
* This class demonstrates Debugging,Syntax HighLighting,Compling
* @author E.Annal Sheeba Rani
* @Version jdk1.6
*/
public class sw1 extends JFrame implements ActionListener,
KeyListener
{
// A frame with text field and Label field
JToolBar tb = new JToolBar();
// icf & b1 an array of values.
String icf[] =
{"new.gif","open.gif","save.gif","cut.gif","copy.gif","paste.gif"};
7. // b1 represents for Tooltip
String bl[] = {"New","Open","Save","Cut","Copy","Paste"};
// Demonstrate a one-dimensional array
ImageIcon ic[] = new ImageIcon[icf.length];
// use a lable to display syntax highlighting
Label l1 = new Label("Syntax Highlighting");
JButton mbl[] = new JButton[icf.length];
// set up manu bar
MenuBar mbar = new MenuBar();
Menu a = new Menu("File");
Menu b = new Menu("Edit");
Menu c = new Menu("Font");
Menu d = new Menu("Font-Size");
Menu f = new Menu("System");
int fsize = 13; // assigns fsize the
Value 13
JTextArea ta,ta1;
JScrollPane js1;
// create a fontList using GraphicsEnvironment
String fontList[] =
GraphicsEnvironment.getLocalGraphicsEnvironment().getAvailableFo
ntFamilyNames();
// create MenuItem
MenuItem m[] = new MenuItem[fontList.length];
MenuItem fs[] = new MenuItem[600];
MenuItem a1 = new MenuItem("New");
MenuItem a2 = new MenuItem("Open");
MenuItem a3 = new MenuItem("Save");
MenuItem a4 = new MenuItem("Save as");
8. MenuItem a5 = new MenuItem("-");
MenuItem a6 = new MenuItem("Exit");
MenuItem b1 = new MenuItem("Cut");
MenuItem b2 = new MenuItem("Copy");
MenuItem b3 = new MenuItem("Paste");
MenuItem d1 = new MenuItem("Compile");
MenuItem d2 = new MenuItem("Run");
String ck="";
int i;
public sw1()
{
super("Java Editor"); //set title
setSize(1024,768); //assign a layoutsize
setLayout(null);
ta=new JTextArea(10,10);
js1=new JScrollPane(ta);
ta1=new JTextArea(5,60);
add(js1);add(ta);add(ta1);add(tb);
a.add(a1);add(l1);
a.add(a2);
a.add(a3);
a.add(a4);
a.add(a5);
a.add(a6);
b.add(b1);
b.add(b2);
b.add(b3);
f.add(d1);
f.add(d2);
mbar.add(a);
mbar.add(b);
mbar.add(c);
mbar.add(d);
mbar.add(f);
setMenuBar(mbar);
// loop for FontList
9. for (i = 0; i < fontList.length; i++ )
{
m[i] = new MenuItem(fontList[i]);
m[i].addActionListener(this);
m[i].setActionCommand(""+i);
c.add(m[i]);
}
// loop for MenuItem
for (i = 8; i <=90 ; i+=2)
{
fs[i] = new MenuItem(String.valueOf(i));
fs[i].addActionListener(new fs());
d.add(fs[i]);
}
//loop for ImageIcone
for( i =0;i<bl.length;i++)
{
ic[i ]= new ImageIcon(icf[i]);
mbl[i] = new JButton(ic[i]);
mbl[i].setToolTipText(bl[i]);
mbl[i].addActionListener(this);
mbl[i].setActionCommand("z"+i);
if(i==3) tb.addSeparator();
tb.add(mbl[i]);
}
tb.reshape(0,0,500,35);
ta.reshape(5,40,1005,500);
10. js1.reshape(5,4,100,35);
// set foregroundcolor for l1 that is Syntax Highlighting
l1.setForeground(Color.green);
// set foregroundcolor for ta that is text area
ta.setForeground(Color.blue);
l1.reshape(400,550,130,30);
ta1.reshape(5,600,1005,200);
ta1.setForeground(Color.red);
add(tb);
add(ta);
add(js1);
add(l1);
// This Listener can performed in wh object
a6.addWindowListener(new wh());
// This Listener can be performed in this object
a1.addActionListener(this);
a2.addActionListener(this);
a3.addActionListener(this);
a4.addActionListener(this);
// This Listener can be performed in wc object
a5.addActionListener(new wc());
b1.addActionListener(new wc());
b2.addActionListener(new wc());
b3.addActionListener(new wc());
d1.addActionListener(new wc());
11. d2.addActionListener(new wc());
ta.addKeyListener(this);
show();
}
//set button action
public class wh extends WindowAdapter {
public void windowClosing(WindowEvent e) {
System.exit(0);
}
}
// an ActionListener that sets the FontSize
public class fs implements ActionListener {
public void actionPerformed(ActionEvent e) {
fsize = Integer.parseInt(e.getActionCommand());
System.out.println(fsize);
}}
public class wc implements ActionListener {
public void actionPerformed(ActionEvent e) {
// create button actions
String cmd= e.getActionCommand();
// associate actions with buttons
if (cmd.equals("Exit")) System.exit(0);
if (cmd.equals("Cut")) ta.cut();
if (cmd.equals("Copy")) ta.copy();
if (cmd.equals("Paste")) ta.paste();
12. if (cmd.equals("Save"))
{
}
if (cmd.equals("Compile"))
{
try {
Runtime rt= Runtime.getRuntime();
Process p= rt.exec("taskmgr.exe");
}
catch(Exception ea) {
System.out.println("Error");
}
}
}
}
public void keyReleased(KeyEvent ke){}
public void keyPressed(KeyEvent ke){}
public void keyTyped(KeyEvent ke)
{
// create a KeyPressed , KeyReleased, Key Typed
Character k = ke.getKeyChar();
int mk = (int) k;
System.out.println(mk);
ck += k;
// create KeyReleased action
if (ck.equals("for "))
{
ta1.setText("");
ta1.append("for(var=init;condition;incr/decr)n");
ta1.append("{n");
ta1.append(" set of statements;n");
ta1.append("}n");
ck="";
}
13. if (ck.equals("if "))
{
ta1.setText("");
ta1.append("if (condition)n");
ta1.append("{n");
ta1.append(" set of statements;n");
ta1.append("}n");
ta1.append("elsen");
ta1.append("{n");
ta1.append(" set of statements;n");
ta1.append("}n");
ck = "";
}
if (ck.equals("do "))
{
ta1.setText("");
ta1.append("don");
ta1.append("{n");
ta1.append(" set of statements;n");
ta1.append("}n");
ta1.append("while (condition);n");
ck = "";
}
if (ck.equals("while "))
{
ta1.setText("");
ta1.append("while(condition)n");
ta1.append("{n");
ta1.append(" set of statements;n");
ta1.append("}n");
ck = "";
}
if (mk == 10 || mk == 32 || mk == 8 || mk == 9) ck ="";
}
//to create Button Link
14. public void actionPerformed(ActionEvent ae)
{
String s1 = (String) ae.getActionCommand();
int ck1=1;
System.out.println(s1);
if (s1.equals("z0"))
{
ta.setText("");ck1=0;
}
if (s1.equals("z3"))
{
ta.cut();ck1=0;
}
if (s1.equals("z4"))
{
ta.copy();ck1=0;
}
if (s1.equals("z5"))
{
ta.paste();ck1=0;
}
if (s1.equals("z1"))
{
// for open a file menu
FileDialog fx = new FileDialog(this,"Open a File",FileDialog.LOAD);
fx.setDirectory("d:jeditor");
fx.setFile("*.*");
fx.show();
String mfname=fx.getDirectory()+fx.getFile();
setTitle(mfname);
File fx1=new File(mfname);
15. try
{
FileInputStream fis=new FileInputStream(fx1);
int fsize=(int) fx1.length();
byte d[] =new byte[fsize];
fis.read(d);
ta.setText("");
ta.setText(new String(d));
}
catch(Exception ex){};
ck1=0;
}
if (s1.equals("z2"))
{
// for open a save menu bar
FileDialog f=new FileDialog(this,"Save a File",FileDialog.SAVE);
f.setDirectory("d:jeditor");
f.setFile("*.java");
f.show();
String fname=f.getDirectory()+f.getFile();
setTitle(fname);
File f1=new File(fname);
try
{
FileOutputStream fos=new FileOutputStream(f1);
String t=ta.getText();
int fsize=t.length();
byte[] d=new byte[fsize];
t.getBytes(0,fsize,d,0);
fos.write(d);
fos.close();
}
catch(Exception e){};
ck1=0;
}
16. if ((s1.compareTo("Open") != 0) && (s1.compareTo("Save")) != 0 &&
(s1.compareTo("New") != 0) && (s1.compareTo("Save as") != 0 &&
(ck1 == 1)))
{
int x = Integer.parseInt(ae.getActionCommand());
String fname = fontList[x];
Font f1 = new Font(fname,Font.BOLD,fsize);
ta.setFont(f1);
}
if (s1.equals("Open"))
{
// for open a open menu bar
FileDialog fx = new FileDialog(this,"Open a File",FileDialog.LOAD);
fx.setDirectory("d:jeditor");
fx.setFile("*.*");
fx.show();
String mfname=fx.getDirectory()+fx.getFile();
setTitle(mfname);
File fx1=new File(mfname);
try
{
FileInputStream fis=new FileInputStream(fx1);
int fsize=(int) fx1.length();
byte d[] =new byte[fsize];
fis.read(d);
ta.setText("");
ta.setText(new String(d));
}
catch(Exception ex){};
}
if (s1.equals("New"))
{
ta.setText("");
}
17. if (s1.equals("Save") || s1.equals("Save as"))
{
// for open a save or saveas menu bar
FileDialog f=new FileDialog(this,"Save a File",FileDialog.SAVE);
f.setDirectory("d:jeditor");
f.setFile("*.java");
f.show();
String fname=f.getDirectory()+f.getFile();
setTitle(fname);
File f1=new File(fname);
try
{
FileOutputStream fos=new FileOutputStream(f1);
String t=ta.getText();
int fsize=t.length();
byte[] d=new byte[fsize];
t.getBytes(0,fsize,d,0);
fos.write(d);
fos.close();
}
catch(Exception e){};
}
}
public static void main(String args[])
{
sw1 app = new sw1();
}
}
18. Out put:-
The output layout
The file menu out put:-
In this file menu we can do the following performances. there are:-
i. Create a New file
ii. Open a file
19. iii. Save a file
iv. Save as a file
v. Exit
Performances for the file menu:-
1: create a new file
To create our new file , we can do following instruction
1. On the File menu, click New.
2. In the New Document task pane, under New, click From existing document.
3. Click the document you want to create a new document from. If you want to open a
document that was saved in a different folder, locate and open the folder.
4. Click Create New.
This document is created in the folder that contains the original document.
2. Open a file
To open a file , we can do following instruction
1. click File, and then click Open.
2. In the Look in list, click the drive, folder, or Internet location that contains the file
you want to open.
3. In the folder list, locate and open the folder that contains the file.
4. Click the file, and then click Open.
20. I.Save a file
• On the File menu, click Save.
• In the File name box, enter a new name for the file.
• Click Save.
Saveas a file
1. On the File menu, click Save as.
2. In the File name box, enter a new name for the file.
3. Click the Save as type drop-down list, and then click the file format that you want
the file saved in.
The out put for edit menu
The edit menu is also perform the following Idem
There are:-
i. Cut
ii. Copy
iii. Paste
21. II. Copy a file
1. On the Standard toolbar, click Open .
2. Click a shortcut on the Places Bar, or in the Look in box, click the drive or folder
that contains the file you want to copy.
3. In the folder list, locate and open the folder that contains the file you want to copy.
4. Right-click the file you want to copy, and then click Copy on the shortcut menu.
5. In the Look in box, click the drive or folder you want to copy the file to.
6. In the folder list, locate and open the folder you want to copy the file to.
7. Right-click anywhere in the folder list (make sure your pointer is not resting over a file in
the list), and then click Paste on the shortcut menu.
III.Cut and Paste a file
1. On the Standard toolbar, click Open .
2. Click a shortcut on the Places Bar, or in the Look in box, click the drive or folder
that contains the file you want to move.
3. In the folder list, locate and open the folder that contains the file you want to move.
4. Right-click the file you want to move, and then click Cut on the shortcut menu.
5. In the Look in box, click the drive or folder you want to move the file to.
6. In the folder list, locate and open the folder you want to move the file to.
7. Right-click anywhere in the folder list (make sure your pointer is not resting over a
file in the list), and then click Paste on the shortcut menu.
The output for syntaxhighlighting
IF WE WANT THE OUTPUT FOR syntaxhighlighting WE FOLLOW THE
FOLLOWING COMMANDS:-
AT FIRST WE TYPE THE WORD ,FOR EXAMPLE WE WANT THE SYNTAX FOR ‘if’
Type the if in text area
Then pressed the spaces bar
Then syntax can be apper in the syntaxhighligthing text.
22. The out put for system
Procedure for compilation :-
First write a program.
Then click systemcompile.
The Task Manager Dialog box can
be opened.
Then click filecompile.
23. Task Manager dialog box can be apper.
Then go to file menu in the Task Manager.
24. Select NEW TASK(RUN…) ,then Run dialog box can be apper.
Enter “cmd” and click ok button.
25. Know we can run it.
Thus we execute the program.