Check Desktop Property by using the Toolkit.getDefaultToolkit() : Toolkit « Development Class « Java






Check Desktop Property by using the Toolkit.getDefaultToolkit()

   

import java.awt.Toolkit;

public class DynamicLayout {
  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);
    else
      tk.setDynamicLayout(true);

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

   
    
  








Related examples in the same category

1.Use the getResourceAsStream method
2.Getting the Screen Size
3.Centering a Frame, Window, or Dialog on the Screen
4.Environment information.