Java Swing Tutorial - Java DataFlavor .getHumanPresentableName ()








Syntax

DataFlavor.getHumanPresentableName() has the following syntax.

public String getHumanPresentableName()

Example

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

import java.awt.datatransfer.DataFlavor;
//from   w  ww  . j  a  va2 s.com
public class Main {

  public static void main(String[] args) {

    DataFlavor df = DataFlavor.stringFlavor;

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

The code above generates the following result.