DynamicLayout.java Source code

Java tutorial

Introduction

Here is the source code for DynamicLayout.java

Source

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");
    }
}