}
public void addSnippet(Object o) {
Transferable tr;
if (o instanceof Color)
tr = new ColorTransferable((Color) o);
else if (o instanceof Image)
tr = new SimpleImageTransferable(SimpleImage.fromImage((Image) o));
else
tr = new StringSelection(String.valueOf(o));
Clipboard clip = getToolkit().getSystemClipboard();