Is it possible to maximize, minimize or get the state of my figure programmatically in MATLAB?
Show older comments
I would like to maximize, minimize or restore my figure programmatically in MATLAB.
I also want to get the position of a maximized window to know where I can place figures on the screen.
Accepted Answer
More Answers (1)
Jan
on 27 Sep 2014
Edited: MathWorks Support Team
on 15 May 2023
In reply to Max Müller's comment: I'm not sure if this works under 2006a already, but it fails under R6.5:
jFrame = get(handle(FigureHandle), 'JavaFrame');
jFrame.setMaximized(1);
Other useful methods:
jFrame.setMaximized(0);
jFrame.setMinimized(1);
jFrame.isMaximized % Thanks Image Analyst
jFrame.isMinimized
2 Comments
Image Analyst
on 27 Sep 2014
Is isMaximzed really spelled like that?
Jan
on 28 Sep 2014
:-) Guess it.
Categories
Find more on Interactive Control and Callbacks in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!