Example usage for java.awt Toolkit getDefaultToolkit

List of usage examples for java.awt Toolkit getDefaultToolkit

Introduction

In this page you can find the example usage for java.awt Toolkit getDefaultToolkit.

Prototype

public static synchronized Toolkit getDefaultToolkit() 

Source Link

Document

Gets the default toolkit.

Usage

From source file:Main.java

public static void main(String[] args) {
    Toolkit tk = Toolkit.getDefaultToolkit();
    tk.beep();
}

From source file:Main.java

public static void main(String[] args) {
    Toolkit tk = Toolkit.getDefaultToolkit();

    System.out.println("System clipboard = " + tk.getSystemClipboard());

}

From source file:Main.java

public static void main(String[] args) {
    Toolkit tk = Toolkit.getDefaultToolkit();

    System.out.println("System event queue = " + tk.getSystemEventQueue());

}

From source file:Main.java

public static void main(String[] args) {
    Toolkit tk = Toolkit.getDefaultToolkit();

    System.out.println("Screen resolution = " + tk.getScreenResolution());

}

From source file:DynamicLayout.java

public static void main(String[] args) {
    Toolkit tk = Toolkit.getDefaultToolkit();
    Object prop = tk.getDesktopProperty("awt.dynamicLayoutSupported");

    System.out.println(tk.isDynamicLayoutActive() ? "yes" : "no");
    if (tk.isDynamicLayoutActive())
        tk.setDynamicLayout(false);//from  w  w  w.j a  va 2  s  .  c  o  m
    else
        tk.setDynamicLayout(true);

    System.out.println(tk.isDynamicLayoutActive() ? "yes" : "no");
}

From source file:Main.java

public static void main(String[] args) {
    Toolkit tk = Toolkit.getDefaultToolkit();
    Dimension d = tk.getScreenSize();
    System.out.println("Screen width = " + d.width);
    System.out.println("Screen height = " + d.height);

}

From source file:Main.java

public static void main(String[] args) throws Exception {
    Toolkit t = Toolkit.getDefaultToolkit();
    Image im = t.getImage("C:/Java/image.PNG");

}

From source file:BasicDraw.java

public static void main(String[] args) {
    Image image = Toolkit.getDefaultToolkit().getImage("image.gif");
    int width = image.getWidth(null);
    int height = image.getHeight(null);

    if (width >= 0) {
        // The image has been fully loaded
    } else {/*from   ww w.j  ava2 s  .c  o m*/
        // The image has not been fully loaded
    }

}

From source file:Main.java

public static void main(String[] argv) throws Exception {
    Dimension dim = Toolkit.getDefaultToolkit().getScreenSize();
    System.out.println(dim);/*from  www.  j a v a 2s .c  o  m*/
}

From source file:MainClass.java

public static void main(String[] args) {
    Toolkit tk = Toolkit.getDefaultToolkit();
    System.out.println("AWT.control = " + tk.getProperty("AWT.control", ""));

}