com.informagen.MacClipboard

Accessing clipboard images from within Java using JDirect

MacClipboard folder ( download)
This is a static class which uses JDirect to check the contents of the System Clipboard for a PICT and returns a java.awt.image object (Let's see those Windows guys do that!)

MacClipboard.java
Source code of which uses JDirect calls to examine the System Clipboard for a PICT, extract the image, and return a return a java.awt.Image object.

ClipboardTest.java
Simple GUI application to excerise MacClipboard.

ClipboardTest ( download)
A runnable JBinary application.

Usage:


    if ( MacClipboard.isMacintosh() ) {
        Image anImage = MacClipboard.getImage();
        if (anImage != null)
            theImageComponent.setImage(anImage);
        }
    }