Re: How to set a JDialog owner to a TopComponent
Neil C Smith <[email protected]> Fri, 06 Oct 2017 09:53:06 +0000
| Newsgroups | gmane.comp.java.netbeans.modules.openide.devel |
|---|---|
| Message-ID | <CAMYaZEu6=nttCYaQSygLmriQn-L9VbMx+0xw5qW09nKRAptrCQ@mail.gmail.com> |
--f403045c4fb260ec68055addcf7e Content-Type: text/plain; charset="UTF-8" Hi, On Fri, 6 Oct 2017, 10:50 cab, <[email protected]> wrote: > > So, I want to set the JDialog window owner, but I don't know what I can > set it to. I thought I could set it to one of my topcomponents, but this > does not look possible. Does anyone have any suggestions? > SwingUtilities.getWindowAncestor on the TopComponent might be a good option. There's also a NetBeans API to get the MainWindow, but not sure from memory how that handles undocked TCs. Best wishes, Neil > -- Neil C Smith Artist & Technologist www.neilcsmith.net Praxis LIVE - hybrid visual IDE for creative coding - www.praxislive.org --f403045c4fb260ec68055addcf7e Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi,<br><br><div class=3D"gmail_quote"><div dir=3D"ltr">On Fri, 6 Oct 2017, = 10:50 cab, <<a href=3D"mailto:[email protected]">heather.0.sava= [email protected]</a>> wrote:<br></div><blockquote class=3D"gmail_quote" styl= e=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br> So, I want to set the JDialog window owner, but I don't know what I can= set it to. I thought I could set it to one of my topcomponents, but this d= oes not look possible. Does anyone have any suggestions?<br></blockquote></= div><div><br></div><div>SwingUtilities.getWindowAncestor on the TopComponen= t might be a good option. There's also a NetBeans API to get the MainWi= ndow, but not sure from memory how that handles undocked TCs.</div><div><br= ></div><div>Best wishes,=C2=A0</div><div><br></div><div>Neil</div><div clas= s=3D"gmail_quote"><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .= 8ex;border-left:1px #ccc solid;padding-left:1ex"> </blockquote></div><div dir=3D"ltr">-- <br></div><div class=3D"gmail_signat= ure" data-smartmail=3D"gmail_signature"><div dir=3D"ltr">Neil C Smith<div>A= rtist & Technologist</div><div><a href=3D"http://www.neilcsmith.net" ta= rget=3D"_blank">www.neilcsmith.net</a></div><div><br></div><div>Praxis LIVE= - hybrid visual IDE for creative coding - <a href=3D"http://www.praxislive= .org" target=3D"_blank">www.praxislive.org</a></div></div></div> --f403045c4fb260ec68055addcf7e--