Java Example Program / Sample Source Code
import java.awt.datatransfer.DataFlavor;
public class CreateDataFlavor {
public static void main(String[] args) {
//Creating DataFlavor using constructor
DataFlavor dataFlavor1 = new DataFlavor("text/plain; charset=ASCII", "Plain ASCII text");
DataFlavor dataFlavor2 = new DataFlavor(java.awt.TextField.class, "AWT TextField");
System.out.println("dataFlavor1 equals dataFlavor2: " + dataFlavor1.isMimeTypeEqual(dataFlavor2));
}
} |
|
|