Example usage for java.awt GraphicsEnvironment getLocalGraphicsEnvironment

List of usage examples for java.awt GraphicsEnvironment getLocalGraphicsEnvironment

Introduction

In this page you can find the example usage for java.awt GraphicsEnvironment getLocalGraphicsEnvironment.

Prototype

public static GraphicsEnvironment getLocalGraphicsEnvironment() 

Source Link

Document

Returns the local GraphicsEnvironment .

Usage

From source file:Main.java

public static void main(String[] args) {

    System.out.println(GraphicsEnvironment.getLocalGraphicsEnvironment().isHeadlessInstance());

}

From source file:Main.java

public static void main(String[] args) {
    GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment();
    ge.preferLocaleFonts();

}

From source file:Main.java

public static void main(String[] args) {
    GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment();
    ge.preferProportionalFonts();

}

From source file:Main.java

public static void main(String[] args) {
    GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment();
    System.out.println(ge.getMaximumWindowBounds());

}

From source file:Main.java

public static void main(String[] args) {
    GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment();
    String familyNames[] = ge.getAvailableFontFamilyNames();

    for (String familyName : familyNames) {
        System.out.println("Family names: " + familyName);
    }/*from   w  w w.j  a  v  a  2  s  .  c o m*/
}

From source file:Main.java

public static void main(String[] args) {

    GraphicsEnvironment e = GraphicsEnvironment.getLocalGraphicsEnvironment();
    String[] fontnames = e.getAvailableFontFamilyNames();
    System.out.println("\nFonts available on this platform: ");
    for (int i = 0; i < fontnames.length; i++)
        System.out.println(fontnames[i]);

    return;//from  w  ww .  j a va 2 s.com
}

From source file:Main.java

public static void main(String[] args) {
    Point center = GraphicsEnvironment.getLocalGraphicsEnvironment().getCenterPoint();

    System.out.println(center);
}

From source file:Main.java

public static void main(String[] args) {
    GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment();
    ge.registerFont(new Font("New Font", Font.BOLD, 20));

}

From source file:Main.java

public static void main(String[] argv) throws Exception {

    GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment();
    String fontNames[] = ge.getAvailableFontFamilyNames();

    for (int i = 0; i < fontNames.length; i++) {
        System.out.println(fontNames[i]);
    }/*from  w  w w .j ava2s  . c  om*/
}

From source file:MainClass.java

public static void main(String[] a) {
    GraphicsEnvironment e = GraphicsEnvironment.getLocalGraphicsEnvironment();
    Font[] fonts = e.getAllFonts(); // Get the fonts
    for (Font f : fonts) {
        System.out.println(f.getFontName());
    }/* w  w w.j a  va2s  . c  o  m*/
}