Java Swing Tutorial - Java GraphicsEnvironment .isHeadlessInstance ()








Syntax

GraphicsEnvironment.isHeadlessInstance() has the following syntax.

public boolean isHeadlessInstance()

Example

In the following code shows how to use GraphicsEnvironment.isHeadlessInstance() method.

import java.awt.GraphicsEnvironment;
/*from   www  . j a v  a 2s . c o  m*/
public class Main {
  public static void main(String[] args) {
    
    System.out.println(GraphicsEnvironment.getLocalGraphicsEnvironment()
        .isHeadlessInstance());
    
  }
}

The code above generates the following result.