Java DataFlavor .setHumanPresentableName (String humanPresentableName)

Syntax

DataFlavor.setHumanPresentableName(String humanPresentableName) has the following syntax.

public void setHumanPresentableName(String humanPresentableName)

Example

In the following code shows how to use DataFlavor.setHumanPresentableName(String humanPresentableName) method.


/*  w  w w.j av a2s  .com*/
import java.awt.datatransfer.DataFlavor;

public class Main {

  public static void main(String[] args) {

    DataFlavor df1 = new DataFlavor("text/plain; charset=ASCII",
        "Plain ASCII text");
    df1.setHumanPresentableName("stringFlavor");

  }
}




















Home »
  Java Tutorial »
    java.awt.datatransfer »




Clipboard
ClipboardOwner
DataFlavor
Transferable