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