<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://wiki.zcubes.com/index.php?action=history&amp;feed=atom&amp;title=Yurttas%2FPL%2FOOL%2FJava%2FF%2F05%2F01%2F05%2F00%2FEditPad00.java</id>
	<title>Yurttas/PL/OOL/Java/F/05/01/05/00/EditPad00.java - Revision history</title>
	<link rel="self" type="application/atom+xml" href="http://wiki.zcubes.com/index.php?action=history&amp;feed=atom&amp;title=Yurttas%2FPL%2FOOL%2FJava%2FF%2F05%2F01%2F05%2F00%2FEditPad00.java"/>
	<link rel="alternate" type="text/html" href="http://wiki.zcubes.com/index.php?title=Yurttas/PL/OOL/Java/F/05/01/05/00/EditPad00.java&amp;action=history"/>
	<updated>2026-05-18T17:11:21Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.35.2</generator>
	<entry>
		<id>http://wiki.zcubes.com/index.php?title=Yurttas/PL/OOL/Java/F/05/01/05/00/EditPad00.java&amp;diff=177081&amp;oldid=prev</id>
		<title>MassBot1: Created page with &quot;&lt;syntaxhighlight lang=&quot;java&quot; line start=&quot;1&quot; enclose=&quot;div&quot;&gt;import javax.swing.*; import java.awt.*; import java.awt.event.*;  /**  *  Implements a simple note pad using Swing c...&quot;</title>
		<link rel="alternate" type="text/html" href="http://wiki.zcubes.com/index.php?title=Yurttas/PL/OOL/Java/F/05/01/05/00/EditPad00.java&amp;diff=177081&amp;oldid=prev"/>
		<updated>2013-11-07T19:35:13Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot; line start=&amp;quot;1&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;import javax.swing.*; import java.awt.*; import java.awt.event.*;  /**  *  Implements a simple note pad using Swing c...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot; line start=&amp;quot;1&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;import javax.swing.*;&lt;br /&gt;
import java.awt.*;&lt;br /&gt;
import java.awt.event.*;&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 *  Implements a simple note pad using Swing components.&lt;br /&gt;
 */&lt;br /&gt;
&lt;br /&gt;
public class EditPad00 {&lt;br /&gt;
  public static void main(String args[]) {&lt;br /&gt;
    new EditPad00();&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
  String rememberedString;&lt;br /&gt;
  JTextArea textEditArea;&lt;br /&gt;
&lt;br /&gt;
  public EditPad00() {&lt;br /&gt;
    JFrame window = new JFrame(&amp;quot;EditPad&amp;quot;);&lt;br /&gt;
    Container contentPane = window.getContentPane();&lt;br /&gt;
&lt;br /&gt;
    /* Create a text area, wrap it in a scroll pane&lt;br /&gt;
       and stuff it in the content pane. */&lt;br /&gt;
    textEditArea = new JTextArea();&lt;br /&gt;
    JScrollPane editArea = new JScrollPane(textEditArea);&lt;br /&gt;
    contentPane.add(editArea, BorderLayout.CENTER);&lt;br /&gt;
&lt;br /&gt;
    // Make the application exit when the window is closed by the user.&lt;br /&gt;
    window.addWindowListener(new WindowAdapter() {&lt;br /&gt;
      public void windowClosing(WindowEvent e) {&lt;br /&gt;
        System.exit(0);&lt;br /&gt;
      }&lt;br /&gt;
    });&lt;br /&gt;
&lt;br /&gt;
    // Create actions that the user can activate&lt;br /&gt;
    Action clearOperation = new AbstractAction(&amp;quot;Clear&amp;quot;) {&lt;br /&gt;
      public void actionPerformed(ActionEvent e) {&lt;br /&gt;
        textEditArea.setText(&amp;quot;&amp;quot;);&lt;br /&gt;
      }&lt;br /&gt;
    };&lt;br /&gt;
&lt;br /&gt;
    Action rememberOperation = new AbstractAction(&amp;quot;Remember&amp;quot;) {&lt;br /&gt;
      public void actionPerformed(ActionEvent e) {&lt;br /&gt;
        rememberedString = textEditArea.getText();&lt;br /&gt;
      }&lt;br /&gt;
    };&lt;br /&gt;
&lt;br /&gt;
    Action recallOperation = new AbstractAction(&amp;quot;Recall&amp;quot;) {&lt;br /&gt;
      public void actionPerformed(ActionEvent e) {&lt;br /&gt;
        if(rememberedString == null) return;&lt;br /&gt;
        textEditArea.setText(rememberedString);&lt;br /&gt;
      }&lt;br /&gt;
    };&lt;br /&gt;
&lt;br /&gt;
    // Create the toolbar and add the actions&lt;br /&gt;
    JToolBar toolbar = new JToolBar();&lt;br /&gt;
    toolbar.add(clearOperation);&lt;br /&gt;
    toolbar.add(rememberOperation);&lt;br /&gt;
    toolbar.add(recallOperation);&lt;br /&gt;
&lt;br /&gt;
    contentPane.add(toolbar, BorderLayout.NORTH);&lt;br /&gt;
&lt;br /&gt;
    // Create the edit menu and add the actions&lt;br /&gt;
    JMenu editMenu = new JMenu(&amp;quot;Edit&amp;quot;);&lt;br /&gt;
    editMenu.add(clearOperation);&lt;br /&gt;
    editMenu.add(rememberOperation);&lt;br /&gt;
    editMenu.add(recallOperation);&lt;br /&gt;
&lt;br /&gt;
    // Put the menu in the menu bar and attach it to menubar&lt;br /&gt;
    JMenuBar menubar = new JMenuBar();&lt;br /&gt;
    menubar.add(editMenu);&lt;br /&gt;
    window.getRootPane().setJMenuBar(menubar);&lt;br /&gt;
&lt;br /&gt;
    window.pack();&lt;br /&gt;
    window.setVisible(true);&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>MassBot1</name></author>
	</entry>
</feed>