CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Sep 1999
    Location
    Mainz, Germany
    Posts
    20

    Copying to the Clipboard

    Hi

    Is it possible to look with Java if there is something in the Clipboard of my Desktop (Windows) ? If, how and how can I put something to it by miself with Java ?

    Thanks for helping

    Thomas

    got to my homepage at http://www.Erbeere.de

  2. #2
    Join Date
    Dec 1999
    Location
    Chonghe, Taipei County, Taiwan, R.O.C.
    Posts
    231

    Re: Copying to the Clipboard

    You may consider the class Clipboard. You may also consider the following method to get the
    system clipboard, which might be the possible method for you to get the native process's clipboard
    data.
    Toolkit.getDefaultToolkit().getSystemClipboard().
    In the class Clipboard, you may use the getContent() method to retrieve the current data in the clipboard.
    You may also reference the interface Transferable.
    I seldom involve this topic, java.awt.datatransfer, so it is for suggestion. You may also reference the
    chapter 16 of Java AWT Reference by John Zukowski.
    good luck,
    Alfred Wu


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured