From Documentation

Maximize and Minimize

With SizeAgent , we can mimic to maximize, minimize, and resize a window or a panel. There are two flags in a window (and a panel) to represent maximized and minimized state respectively. When they are both "false", it represents "original size". To maximize a component, you should set maximized to true and minimized to false. To minimize it, set maximized to false and minimized to true.

ComponentAgent window = desktopAgent.query("window");


//restore to original size;



SizeAgent can also mimic resizing a component by specifying width and height. As test case runs in a simulated environment, there is no screen rendering involved, it simply changes target component's width and height.,

ComponentAgent window = desktopAgent.query("window");, 100);

Supported Components

Panel, Window 5, 6

Last Update : 2022/01/18

Copyright © Potix Corporation. This article is licensed under GNU Free Documentation License.