# Resize Processing canvas in JavaFX window

**URL:** <https://discourse.processing.org/t/resize-processing-canvas-in-javafx-window/16353>\
**Category:** Coding Questions\
**Created:** [December 12, 2019, 7:58pm UTC](https://discourse.processing.org/t/resize-processing-canvas-in-javafx-window/16353 "2019-12-12T19:58:04Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![Lexyth](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/lexyth/32/7403_2.png) [@Lexyth](https://discourse.processing.org/u/Lexyth)\
**Post date:** [December 15, 2019, 6:03pm UTC](https://discourse.processing.org/t/resize-processing-canvas-in-javafx-window/16353/4 "2019-12-15T18:03:23Z")

</div>

Try taking a look at this one :

> [@Resizable window with constrained proportions](https://discourse.processing.org/t/resizable-window-with-constrained-proportions/7536):
>
> When I need the canvas to be resizable I use surface.setResizable(true);. However, I need to keep the width and height equal and can’t seem to find a way to apply constraints to do so. I initially tried to manually set the size to keep the dimensions proportional, but that led to unpleasant flickering when I resized the window. Any ideas on the best way to implement this are welcome. Thanks!

---

_[View the full topic](https://discourse.processing.org/t/resize-processing-canvas-in-javafx-window/16353)._
