# Embedding Processing 3 Sketch Into Swing

**URL:** <https://discourse.processing.org/t/embedding-processing-3-sketch-into-swing/21410>\
**Category:** Project Guidance\
**Created:** [May 29, 2020, 5:33pm UTC](https://discourse.processing.org/t/embedding-processing-3-sketch-into-swing/21410 "2020-05-29T17:33:40Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![micycle](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/micycle/32/201_2.png) [@micycle](https://discourse.processing.org/u/micycle)\
**Post date:** [May 29, 2020, 9:21pm UTC](https://discourse.processing.org/t/embedding-processing-3-sketch-into-swing/21410/2 "2020-05-29T21:21:08Z")

</div>

Launching Processing in the default `JAVA2D` mode creates a swing frame and embeds an AWT canvas (the element that Processing draws on) into it. You can expose the frame and canvas and do anything you want with them: see [Show an desktop menu bar](https://discourse.processing.org/t/show-an-desktop-menu-bar/9651) and [Javax swing JFrame in the main processing PApplet](https://discourse.processing.org/t/javax-swing-jframe-in-the-main-processing-papplet/16122).

Unless you _have_ to use swing, you could use Processing’s `JAVAFX` mode and create a GUI using JavaFX instead – you can even use SceneBuilder to design the UI and [load](https://discourse.processing.org/t/fxml-file-integrate-in-processing/18325) it into Processing.

---

_[View the full topic](https://discourse.processing.org/t/embedding-processing-3-sketch-into-swing/21410)._
