\r
try\r
{\r
- textarea.setText((String) contents.getTransferData(\r
+ textarea.append((String) contents.getTransferData(\r
DataFlavor.stringFlavor));\r
}\r
catch (Exception ex)\r
{\r
}\r
}\r
+\r
+ public void textarea_mousePressed(MouseEvent e)\r
+ {\r
+ if(SwingUtilities.isRightMouseButton(e))\r
+ {\r
+ JPopupMenu popup = new JPopupMenu("Edit");\r
+ JMenuItem item = new JMenuItem("Copy");\r
+ item.addActionListener(new ActionListener()\r
+ {public void actionPerformed(ActionEvent e)\r
+ {\r
+ copyItem_actionPerformed(e);\r
+ }\r
+ });\r
+ popup.add(item);\r
+ item = new JMenuItem("Paste");\r
+ item.addActionListener(new ActionListener()\r
+ {public void actionPerformed(ActionEvent e)\r
+ {\r
+ pasteMenu_actionPerformed(e);\r
+ }\r
+ });\r
+ popup.add(item);\r
+ popup.show(this, e.getX(), e.getY()+30);\r
+\r
+ }\r
+ }\r
+\r
}\r
*\r
* @param e DOCUMENT ME!\r
*/\r
- void textarea_mousePressed(MouseEvent e)\r
+ public void textarea_mousePressed(MouseEvent e)\r
{\r
- if (textarea.getText().equals("Paste your alignment file here"))\r
- {\r
- textarea.setText("");\r
- }\r
+\r
}\r
\r
/**\r