Dynamically resizing windows

I want to change a windows width by a press of a button.
I think i have to create an event on the button to do the job.

The problem is that i cant figure out how to type in data for the variable type “dimension”.

How is a “dimension” value typed?

When i try for example 100, 100 i get this error:
TypeError: can’t convert ‘100,100’ to java.awt.Dimension

You can do the following:window = system.gui.getWindow("SomeWindow") window.setSize(250,600)If you are on the same window you can get the window like this:window = system.gui.getParentWindow(event)As a side note, a Dimension is a Java class. It is possible to use it like this:from java.awt import Dimension d = Dimension(100,100)

1 Like