Coders Packet

Text Editor Using Java

By Kritika Tiwari

A simple Text Editor created using Java Swing using JMenuBar, JTextArea and JMenuItem.

A simple Text Editor using Java Swing. First, we create a JFrame titled "Notepad" containing a menu bar that consists of two menu items.

The two menu items are the File menu and the Edit menu

The File menu contains three options: New, Open and, Save.

The Edit menu contains four options: Cut, Copy, Paste and, Exit.

After setting the look of the JFrame, the actionPerformed() method of each menu item is created and functionality is added to each menu item.

The size of the frame is set using the setBounds() method in the class and visibility is marked as true using the setVisible() method.


Download Complete Code


No comments yet