Cut and Paste into JTextPane of Applet

I am just a JTextPane in an Applet. I want to allow the user to cut and paste text from word into my applet but it seems like it will not transfer. When I transfer the applet to a application it works or if I run the applet in an applet viewer , it works also. When I run the applet over the net into IE, I cannot cut and paste???
There seems to be two different clip boards. One in the applet and one on the desktop. Any suggestions out there??? Help!

Bingo! It is applet security at work. You can not access the system clipboard from an applet. You must sign the applet and then accept the signature when you run the applet or change your policy file (doing the second has many security risks and is not recommended).
If the applet is signed you will not have to add a key listener, just focus on the text field and type ctrl+v and it will paste for you.
DeltaCoder

Similar Messages

  • SQL query works in the SQLPlus, but fires parse error after being cut and pasted into

    One of our client has a SQL query like this:
    SQL> SELECT LNAME,
    2 QUOTA/12,
    3 (SELECT SUM(CAMT) FROM CONSULTING WHERE CONSULTANT = P.EMPLOYEE
    4 AND ACTIVITYCODE = 'C'AND
    5 CDATE BETWEEN '01-JAN-2001' AND '31-JAN-2001') AS SUM,
    6 (SELECT SUM(CAMT) FROM CONSULTING WHERE CONSULTANT = P.EMPLOYEE
    7 AND ACTIVITYCODE = 'C'AND
    8 CDATE BETWEEN '01-JAN-2001' AND '31-JAN-2001') -
    QUOTA/12 AS PL
    9 FROM PERSONNEL P
    10 ORDER BY LNAME;
    Running the above query in the SQLPlus returns appropriate resultsets to the
    user. After the same SQL being cut and pasted into a portal report
    component, running the report component fires the following error:
    Failed to parse query
    Error:ORA-00911: invalid character (WWV-11230)
    Failed to parse as XXX - SELECT LNAME, QUOTA/12, (SELECT SUM(CAMT) FROM
    CONSULTING WHERE CONSULTANT = P.EMPLOYEE AND ACTIVITYCODE = 'C'AND CDATE
    BETWEEN '01-JAN-2001' AND '31-JAN-2001') AS SUM, (SELECT SUM(CAMT) FROM
    CONSULTING WHERE CONSULTANT = P.EMPLOYEE AND ACTIVITYCODE = 'C'AND CDATE
    BETWEEN '01-JAN-2001' AND '31-JAN-2001') - QUOTA/12 AS PL FROM PERSONNEL P
    ORDER BY LNAME; (WWV-08300)
    Cursor is not open
    Is this because of the multi-table queries, or something else? Is there any
    way around this? Any information regarding this will be highly appreciated.
    Thanks.
    null

    Sunny,
    From the error message that you posted it seems that you are putting a semicolon ";" at the end of your query. I checked the query that you have posted. It is working fine for me. (I am using 3.0.8) but I feel it will work in your version also. I tried the query without a ";" at the end --It worked.
    I tried with ";" at the end -- It gave the error that you have posted. So remove the ";" at the end and it should work. If you are still getting the same error then pls write down the version you are using. I will check in that version.
    Thanx,
    Chetan.

  • Cut and Paste into Keynote

    When I cut and paste an image from another keynote or a full slide (same dimensions), I often get a question mark in a box with the slide/image being 'x' out. How do I resolve? Thanks.

    In Numbers I made sure the table was selected as a graphic item:
    Then copied and paste into Keynote:
    See if this helps!
    Regards,

  • Cut and paste problem in an applet :(

    Hi All,
    I have developed an applet based GUI and now I wanted to cut and paste some text from an external application say from a notepad(Windows) to a
    JTextfield in the applet. I tried to do it on a applet but it was not allowing me to do it. I was able to do the same(cut and paste) on a textfield when run as an application. So does the cut and paste operation has anything to do with the sandbox security provided by an applet model?. This sounds bit crazy or maybe Im missing something here. Would appreciate help on this.
    Thanks a ton!
    Thanks,
    Ram

    You can always use CTRL-C and CTRL-V to copy/paste, but if you want to right-click, you have to implement it yourself.. Here's MY implementation, if even has 'Undo'!
    import java.awt.*;
    import java.awt.datatransfer.*;
    import java.awt.event.*;
    import javax.swing.*;
    import javax.swing.event.*;
    import javax.swing.text.*;
    public class CTPopupMenuMouseListener extends MouseAdapter
           private JPopupMenu popup = new JPopupMenu();
           private JMenuItem undoItem, cutItem, copyItem, pasteItem, deleteItem, selectAllItem;
           private JTextComponent textComponent;
           String savedstring="";
           String lastactionselected="";
           public CTPopupMenuMouseListener()
                  Action action = new AbstractAction("Undo")
                    public void actionPerformed(ActionEvent ae) {
                         if(lastactionselected.compareTo("")!=0){
                             textComponent.setText("");
                             textComponent.replaceSelection(savedstring);
                  undoItem = popup.add(action);
                  undoItem.setMnemonic('t');
                  popup.addSeparator();
                  action = new AbstractAction("Cut")
                    public void actionPerformed(ActionEvent ae) {
                          lastactionselected="c";
                          savedstring=textComponent.getText();
                          textComponent.cut();
                  cutItem = popup.add(action);
                  cutItem.setMnemonic('t');
                  action = new AbstractAction("Copy")
                    public void actionPerformed(ActionEvent ae) {
                          lastactionselected="";
                          textComponent.copy();
                  copyItem = popup.add(action);
                  copyItem.setMnemonic('c');
                  action = new AbstractAction("Paste")
                    public void actionPerformed(ActionEvent ae) {
                          lastactionselected="p";
                          savedstring=textComponent.getText();
                          System.out.println("in paste code savedstring is: "+savedstring);
                          textComponent.paste();
                  pasteItem = popup.add(action);
                  pasteItem.setMnemonic('p');
                  action = new AbstractAction("Delete")
                    public void actionPerformed(ActionEvent ae) {
                          lastactionselected="d";
                          savedstring=textComponent.getText();
                          textComponent.replaceSelection("");
                  deleteItem = popup.add(action);
                  deleteItem.setMnemonic('d');
                  popup.addSeparator();
                  action = new AbstractAction("Select All")
                     public void actionPerformed(ActionEvent ae) {
                          lastactionselected="s";
                          savedstring=textComponent.getText();
                          textComponent.selectAll();
                  selectAllItem = popup.add(action);
                  selectAllItem.setMnemonic('a');
            public void mouseClicked(MouseEvent e)
                  if (e.getModifiers()==InputEvent.BUTTON3_MASK)
                         if (!(e.getSource() instanceof JTextComponent))
                               return;
                         textComponent = (JTextComponent)e.getSource();
                         textComponent.requestFocus();
                         boolean enabled = textComponent.isEnabled();
                         boolean editable = textComponent.isEditable();
                         boolean nonempty = !(textComponent.getText()==null || textComponent.getText().equals(""));
                         boolean marked = textComponent.getSelectedText()!=null;
                         boolean pasteAvailable = Toolkit.getDefaultToolkit().getSystemClipboard().getContents(null)
                                    .isDataFlavorSupported(DataFlavor.stringFlavor);
                         undoItem.setEnabled(enabled && editable);
                         cutItem.setEnabled(enabled && editable && marked);
                         copyItem.setEnabled(enabled && marked);
                         pasteItem.setEnabled(enabled && editable && pasteAvailable);
                         deleteItem.setEnabled(enabled && editable && marked);
                         selectAllItem.setEnabled(enabled && nonempty);
                        int nx=e.getX();
                        if (nx>500)
                            nx=nx-popup.getSize().width;
                         popup.show(e.getComponent(),nx, e.getY()-popup.getSize().height);
                  }else if ( e.getClickCount()==2 )
                        CTmainFrame.JTextArea1.setText("");
      }

  • Cut and paste into FileMakerPro

    I've been poking around in the Pages 09 trial, and am concerned about my inability to do some very simple stuff, like cut and paste text from Pages to FileMaker Pro, or translating a document into a text document, so I can Import it into filemaker.
    Am I missing something here?

    For a cut and paste, the soluce is always the same:
    copy to clipboard
    run this huge script
    set the clipboard to (the clipboard as text)
    paste in FileMaker (or in an other document)
    Yvan KOENIG (from FRANCE mercredi 14 janvier 2009 14:00:19)

  • Since I have updated to 9.0.1 I cannot cut and paste into my forum. (Im Admin so you can see this is big trouble for me).. cant do it in my geek forum either yet it works fine in Gmail

    I have managed to 'fool' it a few times by pasting into a gmail then going direct to my forum and repeating the process, but if its a cut n paste from a news site, forget it. It will not accept anything into a quote box or img's.
    I work in a news room.. please help.

    I have managed to 'fool' it a few times by pasting into a gmail then going direct to my forum and repeating the process, but if its a cut n paste from a news site, forget it. It will not accept anything into a quote box or img's.
    I work in a news room.. please help.

  • Problems cutting and pasting into illustrator 4 after upgrading to MAC OS 10.6.44

    Hi-
    I've been using my copy of CS4 illustrator without a problem until I recently upgraded to a macbookpro running OS10.6.4
    When I copy items, any item into illustrator it puts a large black box around where the text is.
    When I open up old documents I created on illustrator I can copy and past those text items without a problem.  here is an example of what Illustrator is doing to my pastes:
    heres what it is supposed to look like:
    Here is what the paste looks like in illustrator now: I can't figure out how to fix this.  Any suggestions?  This is really putting a damper on my publication process.

    If you have AppleCare, you should have a simplified Tech Tool Pro CD already. It is not part of Mac OS X. Tech Tool Pro is a third party utility package that helps diagnose and repair some problems that might occur with a Mac. Just Google for "Tech Tool Pro" (including the double quotes) and you will find tons of information on it. If you don't have Tech Tool Pro, its available for purchase at any store that sells Mac software.

  • How can I cut and paste into a calendar's event notes?

    How can I paste into a calendar event's note section?  The attachement way is too cumbersome.

    You are trying to copy a link, it is most likely in a different color such as the words "Microsoft's own forums" in his post. In Word highlight the word or words, control click on them, select Hyperlink, then Edit Hyperlink, then delete the link from the top box. It will then have a button asking if you want to "Remove Link", click on it.

  • I can't cut and paste any images into apple mail

    I have had my MacBook Pro for over three years now, without much trouble, but recently I've been unable to send images that I have cut and pasted into Apple mail. I can attach an image that I have saved in my photos and it will send but I can not send an image that I have cut and pasted from the internet.
    I am using a gmail pop account and firefox as my primary browser. It took me a few times to figure this out as the image appears to be attached in my mail, but is removed when I send, such that if I have text and an image in an email the recipient receives only the text. Before I hit send I can see both the text and the image.
    I have tried starting again in safe mode and repairing permissions. That has not helped. I can login to my gmail regularly and cut and paste images with no problem.
    This is exceptionally frustrating.

    Hello.  In 2012 you answered a query about the following problem:
    "I have had my MacBook Pro for over three years now, without much trouble, but recently I've been unable to send images that I have cut and pasted into Apple mail. I can attach an image that I have saved in my photos and it will send but I can not send an image that I have cut and pasted from the internet."
    This problem started with me this morning and it does not happen when I open a test account.  The thread stops after you asked if it occurs in the test account, did you ever find a solution to this issue?  I am using mac mail 3.6 on system 10.5.8.
    I hope you receive this, I have never posted in one of these forums.
    Thanks in advance,
    Dave

  • How to cut-and-paste image into forms

    using forms9i, is it possible to cut and paste into a forms image field (database blob field) in the browser?

    Jeff,
    as far as I know this isn't possible. We only support drag and drop operations for text.
    Frank

  • I can't cut and paste

    I want to cut and paste on my web page but the functions are not available and grayed out. I modified the user_pref as directed substituting the web page url for modzilla.org (actually cut and pasted exactly using notepad with no success. The modifications are saved in the file. which is have provided.
    # Mozilla User Preferences
    /* Do not edit this file.
    * If you make changes to this file while the application is running,
    * the changes will be overwritten when the application exits.
    * To make a manual change to preferences, you can visit the URL about:config
    * For more information, see http://www.mozilla.org/unix/customizing.html#prefs
    user_pref("app.update.lastUpdateTime.addon-background-update-timer", 1283608473);
    user_pref("app.update.lastUpdateTime.background-update-timer", 1283608564);
    user_pref("app.update.lastUpdateTime.blocklist-background-update-timer", 1283608906);
    user_pref("app.update.lastUpdateTime.microsummary-generator-update-timer", 1283187314);
    user_pref("app.update.lastUpdateTime.places-maintenance-timer", 1283608587);
    user_pref("app.update.lastUpdateTime.search-engine-update-timer", 1283594485);
    user_pref("browser.anchor_color", "#0000FF");
    user_pref("browser.display.background_color", "#C0C0C0");
    user_pref("browser.display.use_system_colors", true);
    user_pref("browser.download.manager.alertOnEXEOpen", false);
    user_pref("browser.download.manager.showAlertOnComplete", false);
    user_pref("browser.formfill.enable", false);
    user_pref("browser.migration.version", 1);
    user_pref("browser.places.smartBookmarksVersion", 2);
    user_pref("browser.rights.3.shown", true);
    user_pref("browser.startup.homepage", "http://www.msn.com/");
    user_pref("browser.startup.homepage_override.mstone", "rv:1.9.2.8");
    user_pref("browser.visited_color", "#800080");
    user_pref("capability.policy.allowclipboard.Clipboard.cutcopy", "allAccess");
    user_pref("capability.policy.allowclipboard.Clipboard.paste", "allAccess");
    user_pref("capability.policy.allowclipboard.sites", "http://blueroof360.com");
    user_pref("capability.policy.policynames", "allowclipboard");
    user_pref("extensions.enabledItems", "{20a82645-c095-46ed-80e3-08825760534b}:1.2.1,[email protected]:1.0,{972ce4c6-7e08-4474-a285-3208198ce6fd}:3.6.8");
    user_pref("extensions.lastAppVersion", "3.6.8");
    user_pref("extensions.update.notifyUser", false);
    user_pref("font.name.serif.x-western", "Cambria");
    user_pref("general.useragent.extra.microsoftdotnet", "( .NET CLR 3.5.30729)");
    user_pref("idle.lastDailyNotification", 1283514289);
    user_pref("intl.accept_languages", "en-us");
    user_pref("intl.charsetmenu.browser.cache", "ISO-8859-1, UTF-8");
    user_pref("microsoft.CLR.auto_install", false);
    user_pref("network.cookie.prefsMigrated", true);
    user_pref("network.proxy.type", 0);
    user_pref("places.last_vacuum", 1282582722);
    user_pref("print.print_printer", "\\\\DESKTOP\\HP LaserJet P2015 Series PCL 5e");
    user_pref("print.printer_\\\\DESKTOP\\HP_LaserJet_P2015_Series_PCL_5e.print_bgcolor", false);
    user_pref("print.printer_\\\\DESKTOP\\HP_LaserJet_P2015_Series_PCL_5e.print_bgimages", false);
    user_pref("print.printer_\\\\DESKTOP\\HP_LaserJet_P2015_Series_PCL_5e.print_command", "");
    user_pref("print.printer_\\\\DESKTOP\\HP_LaserJet_P2015_Series_PCL_5e.print_downloadfonts", false);
    user_pref("print.printer_\\\\DESKTOP\\HP_LaserJet_P2015_Series_PCL_5e.print_edge_bottom", 0);
    user_pref("print.printer_\\\\DESKTOP\\HP_LaserJet_P2015_Series_PCL_5e.print_edge_left", 0);
    user_pref("print.printer_\\\\DESKTOP\\HP_LaserJet_P2015_Series_PCL_5e.print_edge_right", 0);
    user_pref("print.printer_\\\\DESKTOP\\HP_LaserJet_P2015_Series_PCL_5e.print_edge_top", 0);
    user_pref("print.printer_\\\\DESKTOP\\HP_LaserJet_P2015_Series_PCL_5e.print_evenpages", true);
    user_pref("print.printer_\\\\DESKTOP\\HP_LaserJet_P2015_Series_PCL_5e.print_footercenter", "");
    user_pref("print.printer_\\\\DESKTOP\\HP_LaserJet_P2015_Series_PCL_5e.print_footerleft", "&PT");
    user_pref("print.printer_\\\\DESKTOP\\HP_LaserJet_P2015_Series_PCL_5e.print_footerright", "&D");
    user_pref("print.printer_\\\\DESKTOP\\HP_LaserJet_P2015_Series_PCL_5e.print_headercenter", "");
    user_pref("print.printer_\\\\DESKTOP\\HP_LaserJet_P2015_Series_PCL_5e.print_headerleft", "&T");
    user_pref("print.printer_\\\\DESKTOP\\HP_LaserJet_P2015_Series_PCL_5e.print_headerright", "&U");
    user_pref("print.printer_\\\\DESKTOP\\HP_LaserJet_P2015_Series_PCL_5e.print_in_color", true);
    user_pref("print.printer_\\\\DESKTOP\\HP_LaserJet_P2015_Series_PCL_5e.print_margin_bottom", "0.5");
    user_pref("print.printer_\\\\DESKTOP\\HP_LaserJet_P2015_Series_PCL_5e.print_margin_left", "0.5");
    user_pref("print.printer_\\\\DESKTOP\\HP_LaserJet_P2015_Series_PCL_5e.print_margin_right", "0.5");
    user_pref("print.printer_\\\\DESKTOP\\HP_LaserJet_P2015_Series_PCL_5e.print_margin_top", "0.5");
    user_pref("print.printer_\\\\DESKTOP\\HP_LaserJet_P2015_Series_PCL_5e.print_oddpages", true);
    user_pref("print.printer_\\\\DESKTOP\\HP_LaserJet_P2015_Series_PCL_5e.print_orientation", 0);
    user_pref("print.printer_\\\\DESKTOP\\HP_LaserJet_P2015_Series_PCL_5e.print_pagedelay", 500);
    user_pref("print.printer_\\\\DESKTOP\\HP_LaserJet_P2015_Series_PCL_5e.print_paper_data", 1);
    user_pref("print.printer_\\\\DESKTOP\\HP_LaserJet_P2015_Series_PCL_5e.print_paper_height", " 11.00");
    user_pref("print.printer_\\\\DESKTOP\\HP_LaserJet_P2015_Series_PCL_5e.print_paper_size_type", 0);
    user_pref("print.printer_\\\\DESKTOP\\HP_LaserJet_P2015_Series_PCL_5e.print_paper_size_unit", 0);
    user_pref("print.printer_\\\\DESKTOP\\HP_LaserJet_P2015_Series_PCL_5e.print_paper_width", " 8.50");
    user_pref("print.printer_\\\\DESKTOP\\HP_LaserJet_P2015_Series_PCL_5e.print_reversed", false);
    user_pref("print.printer_\\\\DESKTOP\\HP_LaserJet_P2015_Series_PCL_5e.print_scaling", " 1.00");
    user_pref("print.printer_\\\\DESKTOP\\HP_LaserJet_P2015_Series_PCL_5e.print_shrink_to_fit", true);
    user_pref("print.printer_\\\\DESKTOP\\HP_LaserJet_P2015_Series_PCL_5e.print_to_file", false);
    user_pref("print.printer_\\\\DESKTOP\\HP_LaserJet_P2015_Series_PCL_5e.print_to_filename", "");
    user_pref("print.printer_\\\\DESKTOP\\HP_LaserJet_P2015_Series_PCL_5e.print_unwriteable_margin_bottom", 0);
    user_pref("print.printer_\\\\DESKTOP\\HP_LaserJet_P2015_Series_PCL_5e.print_unwriteable_margin_left", 0);
    user_pref("print.printer_\\\\DESKTOP\\HP_LaserJet_P2015_Series_PCL_5e.print_unwriteable_margin_right", 0);
    user_pref("print.printer_\\\\DESKTOP\\HP_LaserJet_P2015_Series_PCL_5e.print_unwriteable_margin_top", 0);
    user_pref("privacy.sanitize.migrateFx3Prefs", true);
    user_pref("security.warn_viewing_mixed", false);
    user_pref("urlclassifier.keyupdatetime.https://sb-ssl.google.com/safebrowsing/newkey", 1285173052);
    user_pref("xpinstall.whitelist.add", "");
    user_pref("xpinstall.whitelist.add.36", "");

    Hello.  In 2012 you answered a query about the following problem:
    "I have had my MacBook Pro for over three years now, without much trouble, but recently I've been unable to send images that I have cut and pasted into Apple mail. I can attach an image that I have saved in my photos and it will send but I can not send an image that I have cut and pasted from the internet."
    This problem started with me this morning and it does not happen when I open a test account.  The thread stops after you asked if it occurs in the test account, did you ever find a solution to this issue?  I am using mac mail 3.6 on system 10.5.8.
    I hope you receive this, I have never posted in one of these forums.
    Thanks in advance,
    Dave

  • Cut and Paste Photos iphoto 09

    I was experiencing the same problem like the one described in the archived topic with the title "CUT AND PASTE PHOTOS" (http://discussions.apple.com/thread.jspa?threadID=1897601&tstart=120). In few words I wasn't able to cut and paste a picture as when I tried to paste the picture to another event the right click paste command was grey.
    I finally figured out a solution. In the 'Photos' in the Source list select the photo you would like to move, then right click and select cut. Select 'Events' in the Source list (left column), select the event you want to move the photos, the event will open in the photo library mode and you will be able to right click and paste the photo.
    This doesn't work for Copy. Although paste is not grey, the photo can not move.

    The reason you can't cut and paste into another Event is that when you cut the photo goes into iPhoto's Trash bin and you can't paste because a photo can be in only one Event at a time.
    You can move a photo from one event to another by clicking and dragging.
    Message was edited by: Old Toad

  • Small font when I cut and paste

    Got a new MBP about 3 months ago. Whenever I cut and past from a form into an email, the font is always 12 pt and I like 20 pt, which is my default size for email typing. How can I make it so anything I cut/past is 20 pt? Any ideas?

    This problem is bugging me too. I would like it when I cut and paste into an email it would format it correctly rather then copying the color and font size.

  • With emails when I send a link it cannot be opened but has to be cut and pasted by the recipient - how can I avoid this

    When I send a link to a page or website via email (Hotmail or Yahoo) it cannot be opened by the recipient. Instead it needs to be cut and pasted into their browser bar for them to open it.
    This problem only started after loading Firefox on my computer and I wonder if you can help in any way.

    Just above the textarea that you use to enter the message text there is usually a button bar with buttons to add text formatting like Bold and Italic.<br />
    That toolbar may also have a button to turn a text link into a clickable hyperlink (look for a chain like button).<br />
    You can select the text and click that button to turn the link into a clickable hyperlink.<br />
    If you can't find the button then hover them all to check the tooltip of each.<br />
    * Make Link - https://addons.mozilla.org/firefox/addon/make-link/

  • Can I cut and paste directions obtained via maps into a word doc or something so I can see them if I can't connect to the internet

    Can I cut and paste directions form maps into a word doc - or save it somewhere on my iPad so I can access it when I can't access the Internet?

    Take a screen short.
    Simultaneously press the Sleep and Home button. You will notice an on-screen flash. If you have sound enabled, you will hear a camera click.
    The screen shot is stored in Camera Roll.

Maybe you are looking for