Resizing client window question

Hi,

After resizing client window, is it possible to switch back to original size using some hmi button?
(to the size like when project is published)

Thanks

I got this:

You can use this script

from javax.swing import JFrame, SwingUtilities
frame = SwingUtilities.getAncestorOfClass(JFrame, event.source)
frame.setSize(800,600)
frame.setLocation(0,0)

on a button press and it will resize the window to 800x600

Thanks for help, Greg.