Copying to system clipboard

i m tryin to copy an image to the system clipboard,. the syntax being the usual
Toolkit.getDefaultToolkit().getSystemClipboard().setContents(selectedImage,null);
i m not invoking the method      javax.swing.SwingUtilities.invokeLater(new Runnable(){
          public void run()
will that create a problem? cuz i can run it normally wen i m not

will that create a problem?Try it and see.

Similar Messages

  • Signed Applet JTextField copy to system clipboard

    Hi all,
    We have a signed and deployed our JAR file that contains our applet following the instructions listed at:
    http://java.sun.com/products/plugin/1.3/docs/rsa_signing.html
    We used Thwate as our CA. All seemed good.
    However any JTextFields that are in our applet cannot access the system clip board. Looking at the source for JTextComponent it should have access to the system clipboard if the securitymanager allows it.
    The strange thing is that if I call getToolkit().getSystemClipboard() from our applets I can access the clipboard and copy to the system clipboard. Even the code in JTextComponent that checks for system clipboard access (canAccessSystemClipboard) works fine when pasted into the applet.
    Why cant a JTextField copy to the clipboard? Has anyone else come across this?

    Juste an idea.... Is your JTextField belonging to the javax.swing.... packages ?
    Or did you compile using some com.ms , ibm.... sun... package ? This could lead to some different implementations.

  • Programatically copy to  System Clipboard

    I'm trying to programatically copy a value from my applet to the system clipboard without much luck. My jars have all been signed and I am able to ctrl-c and ctrl-v to/from the applet/system clipboard. What I need to be able to do is invoke this behaviour from a popup menu. Below is a code snippet:
    public void actionPerformed(ActionEvent event)
                   Object source  = event.getSource();
                   String strValue = source.toString();
                   StringSelection strSelection = new StringSelection(strValue);
                   Toolkit.getDefaultToolkit().getSystemClipboard().setContents( strSelection , strSelection );
                    // at this point I have verified that 't' does indeed contain my item.
                   Transferable t =Toolkit.getDefaultToolkit().getSystemClipboard().getContents(strSelection );
    }When I try to paste into, say notepad, there does not appear to be anything in the clipboard.
    Any idea as to what I'm doing wrong? I'm using 1.5 plugin (but want to move down to 1.4)
    Thanks,
    -Craig Green

    I guess you didn't sign it right or called your method from untrusted (unsigned) code.
    for signing:
    http://forum.java.sun.com/thread.jsp?forum=63&thread=524815
    second post
    for a full trace:
    To turn the full trace on (windows) you can start the java console, to be found here:
    C:\Program Files\Java\j2re1.4...\bin\jpicpl32.exe
    In the advanced tab you can fill in something for runtime parameters fill in this:
    -Djavaplugin.trace=true -Djavaplugin.trace.option=basic|net|security|ext|liveconnect
    if you cannot start the java console check here:
    C:\Documents and Settings\userName\Application Data\Sun\Java\Deployment\deployment.properties
    I think for linux this is somewhere in youruserdir/java (hidden directory)
    add or change the following line:
    javaplugin.jre.params=-Djavaplugin.trace\=true -Djavaplugin.trace.option\=basic|net|security|ext|liveconnect
    for 1.5:
    deployment.javapi.jre.1.5.0.args=-Djavaplugin.trace\=true -Djavaplugin.trace.option\=basic|net|security|ext|liveconnect
    The trace is here:
    C:\Documents and Settings\your user\Application Data\Sun\Java\Deployment\log\plugin...log
    I think for linux this is somewhere in youruserdir/java (hidden directory)

  • Massive copy to system clipboard with vim?

    Say I'm editing a program with vim through a terminal (say xterm). Does anyone know how to copy the contents, via left click highlighting, onto the system clipboard (x11) when the content that needs to be copied is physically off the screen? I've tried to arrow up while highlighting but it doesn't work.

    toxic, from what I understand from t-dawg's questions is that he wants to emulate what you can do in gvim, but with vim instead.
    In gvim, I can click the mouse button; hold; drag downwards and then gvim will start scrolling downwards, whilst highlighting the passing lines. This is how you highlight large amounts of text (greater than what can fit in a single screen at a time) with a mouse.
    However, terminals are slightly dumber. Whilst you can highlight areas of text, that's a console function and not something that vim itself is monitoring. Therefore, you can't achieve the same effect with the mouse in vim as you can in gvim.
    Of course, vim is perfectly capable of selecting more text than can fit in a single screen. It has a visual mode. Press v and then move down with your cursor keys, et volia - highlighted text.
    Now when it comes to shifting this to X11's clipboard, I've never tried (hence the link I gave for possible help). I'm sure it can be done.

  • Cant copy to system clipboard

    Hi  - And thanks for reading this post.
    Web Premium CS4 /Win XP SP3 2GB RAM etc etc...
    I am stuck ! . I am no longer able to copy to the windows clipboard from PS.
    I can copy some text from a PS document and paste it into another PS document, but I cant paste it into anything else. When I right mouse click into say Notepad or DW CS4 or any other application the option to Paste is always greyed out and unavailable.
    So far I have un-installed PS CS4 and re-installed it to see if that would help. But still not working.
    Anyone seen this or got any suggestions ?
    Thanks.

    First of all, never do a reinstall until you have exhausted the many simpler possible fixes for PS problems.
    Often resetting preferences (which are not changed by a reinstall) fixes many problems. See http://forums.adobe.com/thread/375776?tstart=0
    In this case however it is a continuing, recurring problem with the Windows Clipboard that many have been frustrated by because there is no sure-fire fix.
    Apart from what ZB said sometimes purging the clipboard from within PS does it; sometimes clearing the interfering that M$ Office does, or copying a single character to clear whatever is clogging it. Over the years I have never seen a single effective fix.

  • JTextArea Copy to System Clipboard

    I have written an applet that generates RSA type 1 key pairs. The application version works correctly and outputs to files. The online applet version works but instead of writing to files I write the key data to the JTextArea hoping that it could be copied and pasted into files by the user.
    The catch is that the private key (encrypted) data does not copy correctly when you use CTRL-C and then paste to Notepad. I think it has something to do with the encoded chars causing the copy to malfunction.
    Take a look at the applet and the source code and let me know if you have any ideas about what might work. The main class is KeyJenApplet.java. I have tried JTextPane, JTextField and old TextArea. The old TextArea had popupmenu copy available but it was weird in that it didn't even populate the TextArea entirely when the applet was run. It populated the data much like the copy by only doing a portion of it.
    http://www.cheersdata.com/keyjenapplet.html

    Thanks for the responses.
    I believe Windows does have a scripting language, which may well be the way to go, although so far I'm unfamiliar enough with it to be unsure.
    As for the threads idea, unfortunately, I'm not programming the other application, so that won't work in this case.
    Using java.awt.Robot is a good idea, and it may be the easiest, except that as you point out, the text in the clipboard would have to be broken down into keystrokes, which seems rather awkward and slow.
    The other issue is how to make sure that another app becomes the active window. The Robot can presumably do it by sending keystrokes (like Alt+Tab in Windows), which require that it be the most recently active window--not always a safe assumption. Might there be a safer way?
    Thanks,
    Gregory

  • Problems copying from PJC to system clipboard

    I am working on a PJC to allow for editing of large text fields (> 64K). I have most of the functionality working fine. However, I am having a problem using cut, copy, and paste.
    Some details, the PJC extends VBean and includes as JTextArea. Our users want a right click menu to provide functionality for cutting, copying, pasting, and spell checking. I was able to get the spell check working using JSpell. I am not able to get the menu entries for cut, copy, and paste to work. I construct a JPopMenu with the appropriate items. When the menu is activated, if the user selects cut, the actionPerformed method executed the cut method of the JTextArea. This does cut the text from the item, however it is not added to the clipboard for use in other items, except those that have the same implementation class of the original item. If the user uses the keyboard (CTRL-X, CTRL-C, or CTRL-V) the selected data is copied to the system clipboard
    Here is the method I used to create the menu items:
      private JMenuItem makeMenuItem(String label, char acceleratorKey)
        JMenuItem item = new JMenuItem(label);
        item.addActionListener(this);
        item.setMnemonic(acceleratorKey);
        item.addKeyListener(this);
        printDebugMessage("Horizontal text alignment = " + item.getHorizontalAlignment());
        item.setHorizontalAlignment(SwingConstants.LEFT);
        printDebugMessage("Horizontal text alignment = " + item.getHorizontalAlignment());
        return item;
      }Here is the actionPerformed method:
      public void actionPerformed(ActionEvent ae)
        String selection = ae.getActionCommand();
        if (selection.equals("Cut"))
          printDebugMessage("Cut selected");
          text.cut();
        else if (selection.equals("Copy"))
          printDebugMessage("Copy selected");
          text.copy();
        else if (selection.equals("Paste"))
          printDebugMessage("Paste selected");
          text.paste();
        else if (selection.equals("Spell Check"))
          printDebugMessage("Spell Check selected");
          doSpellCheck();
      }I read that jar files needed to be signed to interact with the desktop, but when I signed the jar file the results were the same.
    Platform
    10g AS on Solaris 10.1.2.2
    Windows XP (SP2)
    IE7
    Sun plugin 1.5.0_11 (problem also occurs with 1.4.2_06)
    Any insights would be helpful.
    Thanks

    will that create a problem?Try it and see.

  • WebView -  text copied with Crtl/C or Popup Menu not in system clipboard!

    Dear JavaFX users,
    We have embedded JavaFX WebView in a Swing panel. Everything works fine, but we have realized that text selected and copied with Crtl/C or Popup Menu is not in the system clipboard.
    This is quite annoying, and we woulld appreciate any advice or suggestion for solving this issue.
    Thanks in advance,
    Best,
    Jean-Claude Dauphin

    i don't have enough space on my remote server, there are 2 other sites on this server as well.
    What are you using, FREE web hosting?
    For approx $4.95/month you can get unlimited storage and bandwidth:
    http://www.lunarpages.com/hosting-solutions/
    Nancy O.
    Alt-Web Design & Publishing
    Web | Graphics | Print | Media  Specialists
    http://alt-web.com/
    http://twitter.com/altweb

  • Copy an image into system clipboard takes too much memory

    Our Swing application copies a java.awt.BufferedImage into the system clipboard. Our image has a size of 1024x768 pixels and a depth of 24 bits per pixel.
    The copy from the image to the system clipboard works, but is very slow and takes too much memory. Before the copy, java.exe uses about 30 MB. After the copy, it uses about 90 MB! However, a 1024x768x3 image should consume only 2,4 MB.
    We did some debugging and it seems the AWT library does several copies of our original image in order to copy it in the system clipboard. I guess that each of these copies takes a lot of memory (probably because of a different format from the original image) and is not immediately garbage collected.
    This is a big issue for our application because the JVM throws an OutOfMemoryError when we try to copy a new image to the system clipboard.
    Here is our code. Do you have any idea? Thanks a lot for your help.
    // Create the image
    BufferedImage image = new BufferedImage(1024, 768, BufferedImage.TYPE_3BYTE_BGR);
    Graphics2D g2 = image.createGraphics();
    drawSomething(g2);
    g2.dispose();
    // Put the image into the system clipboard
    ImageSelection handler = new ImageSelection(image);
    Clipboard clipboard = Toolkit.getDefaultToolkit().getSystemClipboard();
    clipboard.setContents(handler, handler);
    * An implementation of Transferable and ClipboardOwner to be used with
    * images.
    public class ImageSelection implements Transferable, ClipboardOwner {
        private static final DataFlavor flavors[] = {DataFlavor.imageFlavor};
        private Image image;
        public ImageSelection(Image imageToCopy) {
            this.image = imageToCopy;
        // Interface ClipboardOwner
        public void lostOwnership(Clipboard clipboard, Transferable transferable) {
            image = null;
        // Interface Transferable
        public Object getTransferData(DataFlavor flavor) throws UnsupportedFlavorException,
                                                                IOException {
            if (isDataFlavorSupported(flavor)) {
                return image;
            else {
                throw new UnsupportedFlavorException(flavor);
        public DataFlavor[] getTransferDataFlavors() {
            return flavors;
        public boolean isDataFlavorSupported(DataFlavor flavor) {
            return flavor.equals(flavors[0]);
    }

    why dont u use other data structure to store the image , which will take less memory.

  • Copying to the system clipboard

    Hi...
    I am trying to copy the contents of a JPanel to the system clipboard so I can paste it into an app like MS Word. The JPanel just has some lines and dots on it that I've drawn with draw and fillOval.
    I am VERY new to Java so the only way I could figure out to do this was to save the contents of the panel as a .jpg and then wrap it up in a class I created that implements the transferrable interface. This works....and I can paste it into Word and it looks fine on the screen. But when I print it.....it looks very grainy. So I'd like to be able to copy this panel to the clipboard in some other way besides saving it as an image first.
    Is there any other direct way to copy components like a panel with shapes drawn on it to the system clipboard that anyone knows of?
    Thanks in advance!
    Julie

    Thanks for the suggestion. I tried it...but it still looks like crap when I print it.
    I am drawing directly on a Graphics2D object (the exact size I want), then I put into a BufferedImage. Then I save the BufferedImage as a .png, open it back up and copy it to the system clipboard.
    It is just the image quality. Is there a way to manipulate the DPI?
    Thanks again,
    Julie

  • More DataFlavors copied to the clipboard/used in D&D in one step

    Hallo,
    For my GUI app. I would like to enable different types of information to copied to the clipboard.
    e.g. object type 1 - Document ID ( actual row's document ID from JTable ) - to copy document type
    object type 2 - string representation ( columns texts from JTable ) - to copy to excel
    I would like to keep them general, with different possible combinations
    among them ( up to 10 different object types ), according to some specs.
    Has anybody idea, if it is possible ? ( prefarably with 1.4 D&D interface ).
    Data are packed in createTransferable() call, but it allows just 1 format (?) ...
    Maybe I can use some 'envelope' format holding all possible information,
    but that idea doesn't looks nice for me :(
    Thanks for any hint.
    Tibor

    Hi !
    Thanks for your help. For drag & drop it's fine. System will ask for 'best' format as I expect.
    How is it with clipboard ? I had idea to copy table columns as a "text" flavor
    ( for paste into excel ) and user created flavor "id" with documentId inside.
    On paste I would take 'what's better' ( e.g. as a document reference better would be better my "id" flavor,
    because that information doesn't need to be in table cells inside ).
    Maybe I will have to use 'own' clipboard for these reasons.
    Tibor

  • Can't copy to the clipboard in applet

    hi all,
    doing an applet application now, i figure out that when i want to copy a string to the system clipboard (i use the popup menu), JAVA console prompt out error message AccessDenied or if other case, it will prompt NoClassFound .getWindow(Unknow Source)*, this is only happen in Firefox but not IE (and i need it to work on Firefox). but in the other hand, i have another applet application where i use the button to copy the string into the clipboard in Firefox, it has no problem except ask me to enabled the "signed.applets.codebase_principal_support" value to true, then it successfully copied to the cliboard but not the popup menu applet, why?
    * this is when i didn't use java.awt.datatransfer.* but use JSObject
    anyone has idea? thanks. it seem a bit messy, i'll explain more to you if there is something miss out, thanks again

    Move off WEP to WPA or, preferably, to WPA2 (as recommended by Apple). WEP has been deprecated by the WiFi Alliance since 2004 as insecure (it can be cracked in seconds by any hacker).
    Note that each device on a network has a unique IP address but if your address starts with 169 then you did not get a valid IP address assigned to you by your router. If restarting the router did not cure the problem then you should check for a firmware update for your router.

  • Writing on system clipboard from an applet.

    Is it possible?
    I have tried to write on it but an exception is occoured:
    java.security.AccessControlException: access denied (java.awt.AWTPermission accessClipboard)
    The code that I have used is:
    import java.security.*;
    import java.awt.*;
    import java.awt.datatransfer.*;
    import javax.swing.*;
    public class Blah extends JApplet {
    public void init() {
    String exampleStr = "Hi!";
    Clipboard clipboard;
    Transferable trans;
    StringSelection strSelect;
    try {
    SecurityManager security = System.getSecurityManager();
    if (security != null)
    security.checkSystemClipboardAccess();
    clipboard=Toolkit.getDefaultToolkit().getSystemClipboard();
    strSelect = new StringSelection(exampleStr);
    trans = (Transferable)strSelect;
    clipboard.setContents(trans, strSelect);
    System.out.println("Clipboard copy successful");
    catch (Exception e) {
    System.err.println("Clipboard copy failed");
    System.err.println(e);
    Thanks

    First, your applet must be signed to access the system clipboard. And on Netscape 4.7.x, you need to enable the privilege from within the same method where you get the system clipboard. On IE 5.5/6.0, signing the applet is all that is necessary.
    Here's what I do on Netscape:
    Make sure when you call "PrivilegeManager.enablePrivilege("UniversalSystemClipboardAccess");", that you get the system clipboard within the same method. Failure to do this will cause a ForbiddenTargetException.
    My code looks like:
    public java.awt.datatransfer.Clipboard getSystemClipboard()
    java.awt.datatransfer.Clipboard clipboard = null;
    try
    PrivilegeManager.enablePrivilege("UniversalSystemClipboardAccess");
    clipboard = java.awt.Toolkit.getDefaultToolkit().getSystemClipboard();
    PrivilegeManager.revertPrivilege("UniversalSystemClipboardAccess");
    catch (netscape.security.ForbiddenTargetException se)
    se.printStackTrace();
    catch(Exception e)
    e.printStackTrace();
    return clipboard;
    This works successfully on Netscape 4.7.8. On IE 5.5/6.0, I didn't have to do anything other than having a signed applet to get the system clipboard. With the code above, I also am using a signed applet.
    Hope this helps anyone else trying to make this work.
    -Dave.

  • Paste Image to System Clipboard

    Hello all...I can't paste an Image to the system clipboard and was wondering if you could help me. Noticed there was some help on this topic with JDK 1.4.1, however I'm using JDK 1.3.1.
    I following code was copied from Sun at http://developer.java.sun.com/developer/Books/GJ21AWT/ch20.pdf
    but I cant get it to work.
    <code>
    //implement the class like this
    ImageSelection is = new ImageSelection(Constants.DRAWINGSLATE.currentImage.pBitmap[dList.ptr].getImage());
    toolkit.getSystemClipboard().setContents(is, null);
    class ImageSelection implements ClipboardOwner, Transferable
    public static DataFlavor ImageFlavor;
    public static DataFlavor ImageArrayFlavor;
    private DataFlavor[] flavors = {ImageFlavor, ImageArrayFlavor};
    private java.awt.Image image;
    private int width, height;
    static
    try
    ImageFlavor = new DataFlavor(Class.forName("java.awt.Image"),"AWT Image");
    ImageArrayFlavor = new DataFlavor("image/gif", "GIF Image");
    catch(Exception e)
    public ImageSelection(Image image)
    this.image = image;
    public ImageSelection(Image image, int width, int height)
    this.image = image;
    this.width = width;
    this.height = height;
    public synchronized DataFlavor[] getTransferDataFlavors()
    return flavors;
    public boolean isDataFlavorSupported(DataFlavor flavor)
    return flavor.equals(ImageFlavor) || flavor.equals(ImageArrayFlavor);
    public synchronized Object getTransferData(DataFlavor flavor) throws UnsupportedFlavorException
    if (flavor.equals(ImageFlavor))
    return image;
    if (flavor.equals(ImageArrayFlavor))
    return imageToArray();
    else
    throw new UnsupportedFlavorException(flavor);
    public void lostOwnership(Clipboard c, Transferable t)
    private int[] imageToArray()
    int[] pixels = new int[width*height];
    PixelGrabber pg = new PixelGrabber(image, 0, 0, width, height, pixels, 0 , width);
    try
    pg.grabPixels();
    catch(InterruptedException e)
    e.printStackTrace();
    return pixels;
    </code>
    I get this exception
    Couldn't write data flavor java.awt.datatransfer.DataFlavor[representationclass=java.awt.Image;mimetype=application/x-java-serialized-object] to clipboard:
    java.io.IOException: Transferable's flavor data is of unexpected class com.apple.mrj.internal.awt.graphics.VImage
    Thanks for any help.

    I was trying to use ur code with slight modification
    import java.awt.*;
    import java.awt.datatransfer.*;
    import java.io.*;
    import java.util.*;
    public class Test {
    public static void main (String[] parameters) {
              new Test ().test ();
    private void test () {
    Toolkit.getDefaultToolkit().getSystemClipboard ().setContents (          new mageTransferable ("test.jpg"),
         new ClipboardOwner () {
         public void lostOwnership (                                             Clipboard clipboard,
                             Transferable contents) {}
    private class ImageTransferable implements Transferable {
    private String fileName;
    public ImageTransferable (String fileName) {
    System.out.println(" Checking for the File now");
    if (! new File(fileName).exists ()) {
    throw new IllegalArgumentException ("Can't find image");
    System.out.println(" got the file");
    this.fileName = fileName;
    System.out.println(" returning from constructor");
    public Object getTransferData (DataFlavor flavor) throws UnsupportedFlavorException {
    System.out.println("trying to get the data to be transfered");
    if (! isDataFlavorSupported (flavor)) {
    throw new UnsupportedFlavorException (flavor);
    System.out.println("This is a supported flavor");
    return (Image)Toolkit.getDefaultToolkit().createImage (fileName);
    //               System.out.println(
    public boolean isDataFlavorSupported (DataFlavor flavor) {
    System.out.println("trying to check whether the flavour is supported one");
    DataFlavor[] df= this.getTransferDataFlavors();
    System.out.println(" data flavors " + df);
    boolean result = in(flavor, df);
    return result;
    public DataFlavor[] getTransferDataFlavors () {
    //     "image/x-java-image; class=java.awt.Image"
    DataFlavor df=null;
    System.out.println("trying to get the data flavours");
    df =new DataFlavor("application/x-java-serialized-object; class=java.awt.Image","Image");
    //new DataFlavor("image/x-java-image;class=java.awt.Image","Image");
    System.out.println(" Just going to return & DF found was"+ df);
    DataFlavor[] df2 = new DataFlavor[]{df,DataFlavor.plainTextFlavor,DataFlavor.stringFlavor,DataFlavor.javaFileListFlavor };
    System.out.println(df2.length);
    System.out.println(df2[0]);
    return df2;
    private boolean in (DataFlavor flavor, DataFlavor[] flavors) {
    System.out.println("Im in in");
    int f = 0;
    while ((f < flavors.length) && ! flavor.equals (flavors[f])) {
         f ++;
         System.out.println("Im in in's loop");
    return f < flavors.length;
    But this throws the following exception:
    Exception in thread "main" java.lang.ClassCastException: sun.awt.windows.WImage
    at sun.awt.windows.WDataTransferer.translateTransferable(WDataTransferer
    .java:346)
    at sun.awt.DataTransferer.translateTransferable(DataTransferer.java:245)
    at sun.awt.windows.WClipboard.setContents(WClipboard.java:69)
    at Test.test(Test.java:13)
    at Test.main(Test.java:8)
    Is the dataflavour purely dependent on OS. What can be done to overcome this problem

  • Applet access to system Clipboard

    Hi all:
    I am creating a customized version of the mud telnet application for a customer. They have requested cut/paste functionality and I have been able to provide this capability. The problem is the applet cannot get access to the system clipboard so all cut/paste functions can only occur within the applet. I am able to access the system clipboard by creating a java.policy file and setting a permission. The problem is that most of the workstations, and a good number that will be using home computers running Win 98. They don't want the users to have to download the new JRE from Sun (although I know this works). I am looking for a way to creat a JAR file using the old JDK 1.1 (or the current toolkit if it is possible) that will allow access from the Applet to the System Clipboard. I have search the web for an answer, with no success. Can anyone give me any suggestions?
    Anybody had to do the same thing before?
    Thanks.
    John Kreiner

    I know this is an old thread, but I thought I would answer it.
    To access the clipboard via an applet, you need to use JavaScript.
    The first thing to do is to create a class that uses reflection to use the JSObject. The reason why reflection is used is because it is a pain (ITA) to specify a compatible binary for eacy java version (e.g. java40.jar, plugin.jar, jaws.jar, etc). Here is the class:
    import java.lang.reflect.*;
    import java.applet.Applet;
    public class JavaScript {
         public static void call(Applet applet, String methodName, Object[] param) {
              try {
                   Class js = Class.forName("netscape.javascript.JSObject");
                   Method callMethod = js.getMethod("call", new Class[] { String.class, Object[].class });
                   callMethod.invoke(getWindow(applet), new Object[] { methodName, param});
              } catch (Throwable t) {}
         public static Object getWindow(Applet applet) {
              Object o = null;
              try {
                   Class js = Class.forName("netscape.javascript.JSObject");
                   Method getWindowMethod = js.getMethod("getWindow", new Class[] { Applet.class });
                   o = getWindowMethod.invoke(null, new Object[] { applet });
              } catch (Throwable t) {}
              return o;
    }Now, when you want to copy something to the clipboard, you will do:
    JavaScript.call(someApplet, "copyToClipboard", text);
    BUT the "copyToClipboard" function has not been defined yet. This will be a JavaScript function in the html:
    <script language="JavaScript1.1">
    function copyToClipboard(text) {
         document.myForm.myInput.value = text;
         var rng = document.myForm.myInput.createTextRange();
         rng.execCommand("RemoveFormat");
         rng.execCommand("Copy");
    </script>And one last thing is that a JavaScript text component is required in order to create the "rng" variable. To do this, use a hidden field in the html:
    <form name="myForm">
         <input name="myInput" type="hidden">
         </input>
    </form>

Maybe you are looking for

  • The standard report for BOMs of a material with a selected period?

    Hi Gurus Is there any  standard report for BOMs of a material with a selected period?

  • What are the best apps for POS in a salon/dayspa?

    Our spa is attempting to eventually use handheld devices to check out our guests, but we are not sure of the best application to use. We don't need the app to incorporate an appointment book, payroll etc. We just need it to check out our guests for s

  • Sun.applet.AppletViewer vs. appletviewer

    What's the difference between sun.applet.AppletViewer and just plain appletviewer. I recently had a problem with sun.applet.AppletViewer and I just wondered what the difference between the two is. I've looked around on the forum and conducted a searc

  • I don't know how to access my varification email?

    Ive been looking for a answer for almost a year because i kept putting it off because i was unable to work it out my problem is ive tried to download apps and it says i need to verify my email so i tried to figure out where to look and to no avail so

  • Fund problem

    Sir, Its regarding Fund management In this the fund is assigned for material and services. We can assign fund for both of them. But can we assign fund for Activity cost. Plz tell step by step. Any customisation or end user document then plz send. If