Java Swing Tutorial - Java DataFlavor .getRepresentationClass ()








Syntax

DataFlavor.getRepresentationClass() has the following syntax.

public Class<?> getRepresentationClass()

Example

In the following code shows how to use DataFlavor.getRepresentationClass() method.

//  w w w . jav  a 2s  .  c o  m

import java.awt.datatransfer.DataFlavor;

public class Main {

  public static void main(String[] args) {

    DataFlavor df = DataFlavor.stringFlavor;

    System.out.println (df.getRepresentationClass ());
  }
}

The code above generates the following result.