- this.setLayout(borderLayout1);\r
- this.setPreferredSize(new Dimension(400, 300));\r
- scrollPane.getViewport().add(textarea, null);\r
- this.add(scrollPane, java.awt.BorderLayout.CENTER);\r
+ jMenu1.setText("File");\r
+ save.setText("Save");\r
+ save.addActionListener(new ActionListener()\r
+ {\r
+ public void actionPerformed(ActionEvent e)\r
+ {\r
+ save_actionPerformed(e);\r
+ }\r
+ });\r
+ editMenubar.add(jMenu1);\r
+ editMenubar.add(editMenu);\r
+ textarea.setFont(new java.awt.Font("Monospaced", Font.PLAIN, 12));\r
+ textarea.addMouseListener(new java.awt.event.MouseAdapter()\r
+ {\r
+ public void mousePressed(MouseEvent e)\r
+ {\r
+ textarea_mousePressed(e);\r
+ }\r
+ });\r
+ editMenu.setText("Edit");\r
+ pasteMenu.setText("Paste");\r
+ pasteMenu.addActionListener(new ActionListener()\r
+ {\r
+ public void actionPerformed(ActionEvent e)\r
+ {\r
+ pasteMenu_actionPerformed(e);\r
+ }\r
+ });\r
+ copyItem.setText("Copy");\r
+ copyItem.addActionListener(new ActionListener()\r
+ {\r
+ public void actionPerformed(ActionEvent e)\r
+ {\r
+ copyItem_actionPerformed(e);\r
+ }\r
+ });\r
+ this.getContentPane().setLayout(borderLayout2);\r
+ scrollPane.setBorder(null);\r
+ scrollPane.getViewport().add(textarea, null);\r
+ editMenu.add(selectAll);\r
+ editMenu.add(copyItem);\r
+ editMenu.add(pasteMenu);\r
+ this.getContentPane().add(scrollPane, java.awt.BorderLayout.CENTER);\r
+ inputButtonPanel.add(ok);\r
+ inputButtonPanel.add(cancel);\r
+ jMenu1.add(save);\r