Java applet and Clipboard

Is there any way to use information kept in Clipboard in Java applet?
What I need is to use a screen-shot image inside Java applet for Whiteboard purposes.
Who is Participating?
pureDanConnect With a Mentor Commented:
Take a look here....

public void clpbrd()
        System.out.println("Clipboard stuff");
//blah blah
            Clipboard clip = this.getToolkit().getSystemClipboard();
            if(clip == null) throw new IOException("No clipboard in scene");
     //blah blah
            Transferable trans = clip.getContents(this);
    //blah blah
            if( trans == null) throw new IOException("Clipboard Empty");
            String s = (String) trans.getTransferData(DataFlavor.stringFlavor);
            _textArea.replaceRange(s, _textArea.getSelectionStart(),
        catch(Exception e)
//do smthng.  
Pure Java, don't thinks so. With MSIE and MSJ++ may be.
You can do it with native code, but implementing a shared .dll that does the grabbing from the clipboard. Anyway, you need to sign your applet in order to be able to download your dll and load it.
visualcAuthor Commented:
And if the clippboard data is a bitmap?
visualc, maybe it works if the applet it's signed...U have to try it out - Ym not quite sure it will do its job well , but as a suggestion , it works under Win32 'n ' application.
So, try to use it...
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.