# getParentWindow in Custom Method

**URL:** <https://forum.inductiveautomation.com/t/getparentwindow-in-custom-method/39025>\
**Category:** Ignition\
**Tags:** ignition80, vision\
**Created:** [September 24, 2020, 2:51pm UTC](https://forum.inductiveautomation.com/t/getparentwindow-in-custom-method/39025 "2020-09-24T14:51:24Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [September 24, 2020, 3:11pm UTC](https://forum.inductiveautomation.com/t/getparentwindow-in-custom-method/39025/2 "2020-09-24T15:11:11Z")

</div>

SwingUtils is your friend:

> [@onDoubleClick Extension Function](http://forum.inductiveautomation.com/t/ondoubleclick-extension-function/17961/10):
>
> Java’s [SwingUtilities](https://docs.oracle.com/javase/8/docs/api/javax/swing/SwingUtilities.html#getAncestorOfClass-java.lang.Class-java.awt.Component-) can help. Place the following in a script module, shared.swing, perhaps: from javax.swing import SwingUtilities from com.inductiveautomation.factorypmi.application import FPMIWindow def getParentWindow(component): return SwingUtilities.getAncestorOfClass(FPMIWindow, component) Then in your extension function, you can do: w = shared.swing.getParentWindow(self) v = w.rootContainer.customProperty

---

_[View the full topic](https://forum.inductiveautomation.com/t/getparentwindow-in-custom-method/39025)._
