# Dynamically resizing windows

**URL:** <https://forum.inductiveautomation.com/t/dynamically-resizing-windows/5572>\
**Category:** Ignition\
**Created:** [December 13, 2012, 12:09pm UTC](https://forum.inductiveautomation.com/t/dynamically-resizing-windows/5572 "2012-12-13T12:09:35Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![pat.stave](https://avatars.discourse-cdn.com/v4/letter/p/96bed5/32.png) [@pat.stave](https://forum.inductiveautomation.com/u/pat.stave)\
**Post date:** [December 13, 2012, 12:09pm UTC](https://forum.inductiveautomation.com/t/dynamically-resizing-windows/5572/1 "2012-12-13T12:09:35Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Travis.Cox](https://avatars.discourse-cdn.com/v4/letter/t/b9bd4f/32.png) [@Travis.Cox](https://forum.inductiveautomation.com/u/Travis.Cox)\
**Post date:** [December 13, 2012, 6:37pm UTC](https://forum.inductiveautomation.com/t/dynamically-resizing-windows/5572/2 "2012-12-13T18:37:28Z")

</div>

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)`
