Java Swing Tutorial - Java DataFlavor plainTextFlavor


DataFlavor.plainTextFlavor has the following syntax.

public static final DataFlavor plainTextFlavor


In the following code shows how to use DataFlavor.plainTextFlavor field.

/*w  w  w  .j a  va  2 s .com*/
import java.awt.datatransfer.DataFlavor;

public class Main {

  public static void main(String[] args) {

    DataFlavor df = DataFlavor.plainTextFlavor;

    System.out.println (df.toString());

The code above generates the following result.